Skip to content

Commit

Permalink
Shutdown server if DB connection fails
Browse files Browse the repository at this point in the history
  • Loading branch information
harveysanders committed Jan 2, 2024
1 parent 7503828 commit 90d0c64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion function.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func NewSignupServer() *signupServer {

mongoClient, dbName, err := getMongoClient()
if err != nil {
log.Printf("Could not connect to MongoDB: %v\n", err)
log.Fatalf("Could not connect to MongoDB: %v\n", err)
}

gldbService := mongodb.New(dbName, mongoClient)
Expand Down

0 comments on commit 90d0c64

Please sign in to comment.