initiate sys before using it.

fixes https://github.com/fiatjaf/njump/issues/65
This commit is contained in:
fiatjaf
2024-08-07 01:47:39 -03:00
parent f59afbd5b7
commit 0522dd4b78

View File

@@ -54,6 +54,9 @@ func main() {
s.TrustedPubKeys = defaultTrustedPubKeys
}
// eventstore and nostr system
defer initSystem()()
if s.RelayConfigPath != "" {
configr, err := os.ReadFile(s.RelayConfigPath)
if err != nil {
@@ -104,9 +107,6 @@ func main() {
// internal db
defer cache.initializeCache()()
// eventstore and nostr system
defer initSystem()()
// initialize routines
ctx, cancel := context.WithCancel(context.Background())
defer cancel()