feat: add Quart app factory, config loader, and /api/health endpoint
Config reads from env vars (12-factor); .env.example documents defaults. Health endpoint is liveness-only (no DB/Redis touch). Test added for CI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
"""API blueprint registration."""
|
||||
|
||||
from quart import Blueprint
|
||||
|
||||
from . import health
|
||||
|
||||
api_bp = Blueprint("api", __name__, url_prefix="/api")
|
||||
api_bp.add_url_rule("/health", view_func=health.get_health, methods=["GET"])
|
||||
@@ -0,0 +1,5 @@
|
||||
"""Health endpoint — no DB or Redis touch; just liveness."""
|
||||
|
||||
|
||||
async def get_health():
|
||||
return {"status": "ok"}, 200
|
||||
Reference in New Issue
Block a user