From a6737e7f233c43c8222faabca991d8c666837c05 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 4 Dec 2022 18:04:57 +0530 Subject: added (untested) auth mechanism --- database/database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'database') 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") } -- cgit v1.2.3