SundewAIHealth / app /main.py
mgbam's picture
Upload 2 files
5208096 verified
raw
history blame
536 Bytes
from fastapi import FastAPI
from app.api import ecg
from app.db.session import close_engine, init_db
app = FastAPI(title="Sundew Health API", version="0.1.0")
@app.on_event("startup")
def on_startup() -> None:
init_db()
@app.on_event("shutdown")
def on_shutdown() -> None:
close_engine()
@app.get("/health", tags=["meta"])
async def health_check() -> dict:
"""
Simple health endpoint to verify the API is running.
"""
return {"status": "ok"}
app.include_router(ecg.router, prefix="/ecg", tags=["ecg"])