feat: add API key authentication and health endpoint
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
from fastapi import FastAPI
|
||||
|
||||
from src.backend.api.routes.health import router as health_router
|
||||
from src.backend.db.database import init_db
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
await init_db()
|
||||
yield
|
||||
|
||||
|
||||
app = FastAPI(title="OpusAgent", version="0.1.0", lifespan=lifespan)
|
||||
|
||||
app.include_router(health_router, prefix="/api")
|
||||
Reference in New Issue
Block a user