mirror of
https://github.com/saveweb/solar_tracker.git
synced 2024-09-19 03:05:29 -07:00
feat: compressions for DB connections
This commit is contained in:
parent
8c1eaf8de9
commit
7063002ab6
3
main.go
3
main.go
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user