All checks were successful
Gitea Actions Demo / deploy (push) Successful in 35s
18 lines
372 B
Python
18 lines
372 B
Python
from fastapi import FastAPI
|
|
from config.settings import settings
|
|
from api.v1.routers import api_router
|
|
|
|
def create_app(lifespan=None) -> FastAPI:
|
|
app = FastAPI(
|
|
title=settings.APP_NAME,
|
|
debug=settings.DEBUG,
|
|
lifespan=lifespan,
|
|
)
|
|
|
|
# 注册路由
|
|
app.include_router(api_router, prefix="/api/v1")
|
|
|
|
return app
|
|
|
|
|
|
# app = create_app() |