Files
mindfulness/server/app/main.py
2026-02-02 10:47:24 +08:00

30 lines
630 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from fastapi import FastAPI
from app.core.config import get_settings
from app.api.v1.user_profile_scoring import router as user_profile_router
def create_app() -> FastAPI:
"""
创建 FastAPI 应用实例。
说明目前仅提供最小可运行骨架health check后续逐步加入路由与中间件。
"""
settings = get_settings()
app = FastAPI(title=settings.app_name)
# 业务路由
app.include_router(user_profile_router)
@app.get("/healthz")
async def healthz() -> dict:
return {"status": "ok", "env": settings.app_env}
return app
app = create_app()