bugfix: 修复代码出错

This commit is contained in:
chenwj 2023-05-20 23:43:33 +08:00
parent 5b1b5a0d0c
commit b924f18141
2 changed files with 15 additions and 5 deletions

5
app.py
View File

@ -1,5 +0,0 @@
from fastapi import FastAPI
app = FastAPI()

15
main.py Normal file
View File

@ -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()