summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-12-04 18:04:57 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-12-04 18:04:57 +0530
commita6737e7f233c43c8222faabca991d8c666837c05 (patch)
treec00c46ab331f8963b78817776b0d135f513097ba /database
parent11bc12b1f12ed794f0a53a3b0d539a16dc8bd04a (diff)
added (untested) auth mechanism
Diffstat (limited to 'database')
-rw-r--r--database/database.go4
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")
}