diff options
| -rw-r--r-- | cmd/main.go | 2 | ||||
| -rw-r--r-- | nats/notify.go | 3 | 
2 files changed, 3 insertions, 2 deletions
diff --git a/cmd/main.go b/cmd/main.go index 6d5dfec..ab0cb4d 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -22,7 +22,7 @@ func main() {  		workDir = "."  	} -	notifier := &nats.NatsNotifier{} +	notifier := &nats.NatsNotifier{ServerUrl: "nats://nats-server:4222"}  	databasePath := path.Join(workDir, "registrations.sqlite")  	repository := uvok_sqlite.NewRepository(databasePath, context) diff --git a/nats/notify.go b/nats/notify.go index 56cbc7f..d75928d 100644 --- a/nats/notify.go +++ b/nats/notify.go @@ -6,10 +6,11 @@ import (  )  type NatsNotifier struct { +	ServerUrl string  }  func (notif *NatsNotifier) NotifyNewRegistration(reg *registration.Registration) error { -	conn, err := nats.Connect("nats://nats-server:4222") +	conn, err := nats.Connect(notif.ServerUrl)  	if err != nil {  		return err  	}  | 
