From bf38169013817fb4f8f84e77a00d69377bf6a082 Mon Sep 17 00:00:00 2001 From: Edward J Date: Thu, 7 Aug 2025 22:50:06 -0700 Subject: [PATCH] Update golang mongo sample to work with GCP mongo support --- samples/golang-mongodb/app/main.go | 2 +- samples/golang-mongodb/compose.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/golang-mongodb/app/main.go b/samples/golang-mongodb/app/main.go index 2ad65f12..dcb769f3 100644 --- a/samples/golang-mongodb/app/main.go +++ b/samples/golang-mongodb/app/main.go @@ -37,7 +37,7 @@ func main() { } fmt.Println("Connected to MongoDB!") - collection := client.Database("taskManager").Collection("tasks") + collection := client.Database("taskmanager").Collection("tasks") fs := http.FileServer(http.Dir("./static")) http.Handle("/", fs) diff --git a/samples/golang-mongodb/compose.yaml b/samples/golang-mongodb/compose.yaml index c8caba56..e101676d 100644 --- a/samples/golang-mongodb/compose.yaml +++ b/samples/golang-mongodb/compose.yaml @@ -11,7 +11,7 @@ services: environment: # If you want to use MongoDB Atlas, you can set the URI with `defang config set MONGO_URI`. # This will override any value set in the environment variable: - - MONGO_URI=mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@db:27017/ + - MONGO_URI=mongodb://$MONGO_INITDB_ROOT_USERNAME:$MONGO_INITDB_ROOT_PASSWORD@db:27017/taskmanager #deploy: # resources: # reservations: