Skip to content
Snippets Groups Projects
Commit d77d0160 authored by David PETIT's avatar David PETIT
Browse files

Update main.go

parent 335d51bb
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ func main() { ...@@ -32,7 +32,7 @@ func main() {
// define the mongo client // define the mongo client
// without docker you must be use this url --> mongodb://127.0.0.1:27017 // without docker you must be use this url --> mongodb://127.0.0.1:27017
// with docker you must be use this url --> mongodb://mongo:27017/ // with docker you must be use this url --> mongodb://mongo:27017/
clientOptions := options.Client().ApplyURI("mongodb://mongo:27017/") clientOptions := options.Client().ApplyURI("mongodb://mongo:27017")
client, errMongo := mongo.Connect(ctx, clientOptions) client, errMongo := mongo.Connect(ctx, clientOptions)
// errMongo // errMongo
if errMongo != nil { if errMongo != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment