Files
work-queue-api/app/main.py
Steve W fbc88bb62b
Some checks failed
ci / build-test-push (push) Failing after 1m42s
feat: rebuild work queue api with fastapi and postgres
2026-04-11 19:24:52 +00:00

24 lines
512 B
Python

from contextlib import asynccontextmanager
from fastapi import FastAPI
from app.db import run_migrations
from app.routers.projects import router as projects_router
from app.routers.work import router as work_router
@asynccontextmanager
async def lifespan(_: FastAPI):
run_migrations()
yield
app = FastAPI(title="Work Queue API", lifespan=lifespan)
app.include_router(projects_router)
app.include_router(work_router)
@app.get("/health")
def health() -> dict[str, str]:
return {"status": "ok"}