diff --git a/app.py b/app.py deleted file mode 100644 index 7cd2dfa..0000000 --- a/app.py +++ /dev/null @@ -1,5 +0,0 @@ - -from fastapi import FastAPI - -app = FastAPI() - diff --git a/main.py b/main.py new file mode 100644 index 0000000..e4fbca7 --- /dev/null +++ b/main.py @@ -0,0 +1,15 @@ + +from fastapi import FastAPI + +def create_app(): + app = FastAPI() + + # 添加路由 + from src.api import index + app.include_router(index.router, prefix="/api/v1", tags=["API首页"]) + + + return app + +fast_api_app = create_app() +