Migrate Flask React template into Forge

This commit is contained in:
rob
2026-11-17 19:39:11 +00:00
parent bc6b6d26f1
commit 444406d2fc
109 changed files with 9427 additions and 13 deletions
@@ -0,0 +1,34 @@
from settings import app
from sqlalchemy import text
from sqlalchemy.exc import SQLAlchemyError
from settings import db
from .token_routes import * # noqa: F401 F403
from .user_routes import * # noqa: F401 F403
from .contact_routes import * # noqa: F401 F403
@app.route("/api/test")
def test_route():
"""Test."""
return {"success": True}
@app.get("/api/health")
def health():
"""Backward-compatible liveness probe."""
return {"status": "ok"}
@app.get("/api/health/live")
def health_live():
return {"status": "ok"}
@app.get("/api/health/ready")
def health_ready():
try:
db.session.execute(text("SELECT 1"))
except SQLAlchemyError:
app.logger.error("Database readiness check failed")
return {"status": "unavailable"}, 503
return {"status": "ready"}