Initial MVP skeleton with auth, chat persistence, UI and text LLM integration
This commit is contained in:
20
backend/app/api/health.py
Normal file
20
backend/app/api/health.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from fastapi import APIRouter
|
||||
from sqlalchemy import text
|
||||
from sqlalchemy import create_engine
|
||||
|
||||
from app.core.config import settings
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/health")
|
||||
def health() -> dict:
|
||||
return {"status": "ok", "service": "backend"}
|
||||
|
||||
|
||||
@router.get("/ready")
|
||||
def ready() -> dict:
|
||||
engine = create_engine(settings.database_url, pool_pre_ping=True)
|
||||
with engine.connect() as conn:
|
||||
conn.execute(text("SELECT 1"))
|
||||
return {"status": "ready", "database": "ok"}
|
||||
Reference in New Issue
Block a user