diff options
Diffstat (limited to 'database')
-rw-r--r-- | database/database.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/database/database.go b/database/database.go index a970ee1..85fabde 100644 --- a/database/database.go +++ b/database/database.go @@ -42,13 +42,13 @@ func init() { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - var err error + var err error client, err = mongo.Connect(ctx, options.Client().ApplyURI("mongodb://127.0.0.1:27017")) if err != nil { log.Fatal(err) } - log.Println("Successfully connected to MongoDB database.") + log.Println("Successfully connected to MongoDB database.") DB = client.Database("OpenBillsDB") } |