- 更新后端 main.py、config.py 核心配置 - 更新 compute API 模块 - 更新 Docker 部署配置(app/compute docker-compose、nginx、环境变量) - 更新前端 API 模块(dataset、model、request)及 vite 配置 - 更新多项项目文档(架构、部署、开发计划、日志等) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
450 B
Python
19 lines
450 B
Python
from fastapi import FastAPI
|
|
|
|
from app.api.v1.router import api_router
|
|
from app.core.config import get_settings
|
|
from app.core.logging import configure_logging, setup_request_logging
|
|
|
|
|
|
def create_app() -> FastAPI:
|
|
settings = get_settings()
|
|
configure_logging(settings)
|
|
|
|
app = FastAPI(title=settings.app_name)
|
|
setup_request_logging(app)
|
|
app.include_router(api_router, prefix=settings.route_prefix)
|
|
return app
|
|
|
|
|
|
app = create_app()
|