File size: 434 Bytes
a906083 3be496d c1ba890 24717ec 2aed3fd 24717ec a906083 3be496d c1ba890 a906083 2aed3fd 3be496d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from fastapi import FastAPI
from routes import router # routes.py must be in same folder
from question import askMe
from dotenv import load_dotenv
from cache_init import fetch_and_cache_articles
load_dotenv()
app = FastAPI()
app.include_router(router)
app.include_router(askMe)
@app.on_event("startup")
async def startup_event():
fetch_and_cache_articles()
@app.get("/health")
def health_check():
return {"status": "ok"}
|