Commit 57388136 authored by Sasit Wiratjinda's avatar Sasit Wiratjinda 🤕

Update database.py

parent 334c4fc7
import pymongo import pymongo
def get_connection(collection:str): def get_connection(collection:str):
# client = pymongo.MongoClient("mongodb://easybistro:xejP3257@13.212.117.20:27017/Easybistro?authSource=admin&retryWrites=true&w=majority")
client = pymongo.MongoClient('mongodb://easybistro:xejP3257@easybistro-database/Easybistro?authSource=admin&retryWrites=true&w=majority') client = pymongo.MongoClient('mongodb://easybistro:xejP3257@easybistro-database/Easybistro?authSource=admin&retryWrites=true&w=majority')
return client['easybistro'][collection] return client['easybistro'][collection]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment