Commit e280d136 authored by Ai-Sasit's avatar Ai-Sasit

update config

parent f006c4b6
...@@ -11,7 +11,7 @@ import ( ...@@ -11,7 +11,7 @@ import (
) )
func ConnectDB() *mongo.Client { func ConnectDB() *mongo.Client {
client, err := mongo.NewClient(options.Client().ApplyURI("mongodb://admin:xejP3257@20.239.188.252/Esan-Shabu?authSource=admin&retryWrites=true&w=majority")) client, err := mongo.NewClient(options.Client().ApplyURI("mongodb://admin:xejP3257@20.239.188.252/?authSource=admin&retryWrites=true&w=majority"))
if err != nil { if err != nil {
log.Fatal("err") log.Fatal("err")
} }
...@@ -27,7 +27,8 @@ func ConnectDB() *mongo.Client { ...@@ -27,7 +27,8 @@ func ConnectDB() *mongo.Client {
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
fmt.Println("Connected to MongoDB") fmt.Println("🧩 DB connected successfully!")
fmt.Println("⚗️ DB name: golangAPI")
return client return client
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment