Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ import os
|
|
7 |
# client = pymongo.MongoClient("mongodb://localhost:27017/")
|
8 |
# db = client["todo_db"]
|
9 |
|
10 |
-
|
11 |
-
|
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
|
|
|
7 |
# client = pymongo.MongoClient("mongodb://localhost:27017/")
|
8 |
# db = client["todo_db"]
|
9 |
|
10 |
+
user_name = os.environ.get("user_name", None)
|
11 |
+
passwd = 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
|