Spaces:
Running
Running
| 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") | |
| def on_startup() -> None: | |
| init_db() | |
| def on_shutdown() -> None: | |
| close_engine() | |
| 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"]) | |