zyliu commited on
Commit
58e87e3
1 Parent(s): c9a8625

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -7,7 +7,9 @@ import os
7
  # client = pymongo.MongoClient("mongodb://localhost:27017/")
8
  # db = client["todo_db"]
9
 
10
- uri = os.environ.get("mongo_uri", None)
 
 
11
  print(f"uri: {uri}")
12
  # Create a new client and connect to the server
13
  client = pymongo.MongoClient(uri, server_api=ServerApi('1'))
 
7
  # client = pymongo.MongoClient("mongodb://localhost:27017/")
8
  # db = client["todo_db"]
9
 
10
+ uri = os.environ.get("user_name", None)
11
+ uri = os.environ.get("passwd", None)
12
+ uri = f"mongodb+srv://{user_name}:{passwd}@cluster0.2wsoa5b.mongodb.net/?retryWrites=true&w=majority"
13
  print(f"uri: {uri}")
14
  # Create a new client and connect to the server
15
  client = pymongo.MongoClient(uri, server_api=ServerApi('1'))