Commit af84c3e3 authored by Ai-Sasit's avatar Ai-Sasit

update

parent a2c37a6f
import uvicorn
if __name__ == "__main__":
uvicorn.run("server.core:app", host="0.0.0.0", port=5000, reload=True, ssl_keyfile="./key.pem", ssl_certfile="./cert.pem")
\ No newline at end of file
uvicorn.run("server.core:app", host="0.0.0.0", port=8000, reload=True)
\ No newline at end of file
......@@ -12,6 +12,7 @@ app = FastAPI(docs_url="/api/docs", openapi_url="/api", title="Database REST API
origins = [
"http://localhost:8080",
"http://localhost:8100",
"https://easybistro-office.web.app",
"https://easybistro-owner-manager.web.app",
]
......
import pymongo
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')
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