|
var ( |
|
username = os.Getenv("MONGO_USER") |
|
password = os.Getenv("MONGO_PASS") |
|
) |
|
|
|
opts := options.Client().ApplyURI(fmt.Sprintf("mongodb+srv://%s:%s@cluster0.q5uor.mongodb.net/hacksoc?retryWrites=true&w=majority", username, password)) |
|
|
|
log.Println("connecting to mongodb database...") |
Currently, It's tied to the server, we can't use anything other that that mongodb atlas instance (i.e) we can't swap to a local version of mongodb if we want/need to
voting/common/common.go
Lines 23 to 30 in 32be358
Currently, It's tied to the server, we can't use anything other that that mongodb atlas instance (i.e) we can't swap to a local version of mongodb if we want/need to