Skip to content

Commit

Permalink
chore: Update NATS connection handling and error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
qjoly committed Sep 14, 2024
1 parent dc2454f commit d65df8b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion coffee-maker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ func main() {
os.Exit(1)
}

nc, err := nats.Connect(os.Getenv("NATS_URL"), nats.Options{}
opt, err := nats.NkeyOptionFromSeed("seed.txt")
if err != nil {
log.Fatal(err)
}

nc, err := nats.Connect(os.Getenv("NATS_URL"), opt)
if err != nil {
log.Fatal("connect to nats: ", err)
}
Expand Down

0 comments on commit d65df8b

Please sign in to comment.