1
0
mirror of https://github.com/ltcptgeneral/cs239-caching.git synced 2025-09-04 22:37:23 +00:00

[ADD] - Added social media user profile get and upsert microservice with nosql database integration

This commit is contained in:
PurvaG1700
2025-02-17 11:03:02 -08:00
parent 67bf966a6a
commit 12de833f66
12 changed files with 186 additions and 3 deletions

12
app/run.py Normal file

@@ -0,0 +1,12 @@
import os
import uvicorn
from database import init_db # Ensure database initializes before starting FastAPI
os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
if __name__ == "__main__":
# Initialize TinyDB (NoSQL) before FastAPI starts
init_db()
# Start the FastAPI server with custom options
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True, workers=2)