add online mongodb

This commit is contained in:
behrooz
2025-09-04 20:13:40 +03:30
parent 08d17a33ea
commit 98481d56eb

View File

@@ -14,7 +14,7 @@ var (
) )
func InitDB() { func InitDB() {
clientOptions := options.Client().ApplyURI("mongodb://root:example@localhost:27017/") clientOptions := options.Client().ApplyURI("mongodb://root:secret123@130.185.77.247:31141/")
client, err := mongo.Connect(context.TODO(), clientOptions) client, err := mongo.Connect(context.TODO(), clientOptions)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)