Skip to content

Commit

Permalink
feat: compressions for DB connections
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed May 26, 2024
1 parent 8c1eaf8 commit 7063002
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ func connect_to_mongodb() {
fmt.Println("Connecting to MongoDB...")
fmt.Println("MONGODB_URI: len=", len(MONGODB_URI))
serverAPI := options.ServerAPI(options.ServerAPIVersion1)
opts := options.Client().ApplyURI(MONGODB_URI).SetServerAPIOptions(serverAPI)
opts := options.Client().ApplyURI(MONGODB_URI).SetServerAPIOptions(serverAPI).SetAppName("solar-tracker")
fmt.Println("Compressors: ", opts.Compressors)

client, err := mongo.Connect(context.TODO(), opts)
if err != nil {
Expand Down

0 comments on commit 7063002

Please sign in to comment.