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,19 @@
|
||||
"""Quart app factory."""
|
||||
|
||||
import logging
|
||||
|
||||
from quart import Quart
|
||||
|
||||
from .api import api_bp
|
||||
from .config import get_config
|
||||
|
||||
|
||||
def create_app() -> Quart:
|
||||
cfg = get_config()
|
||||
logging.basicConfig(level=cfg.log_level)
|
||||
|
||||
app = Quart(__name__)
|
||||
app.secret_key = cfg.secret_key
|
||||
app.register_blueprint(api_bp)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user