Merge pull request '添加示例' (#3) from 张昕浩 into main

Reviewed-on: #3
This commit is contained in:
2026-09-20 17:07:37 +08:00
2 changed files with 25 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#这是一个示例文件,确保api端口能被正常调用
from fastapi import APIRouter
example_router = APIRouter()
@example_router.get("/example")
def example():
return {'hello DoubaoTeam'}
+17
View File
@@ -0,0 +1,17 @@
from fastapi import FastAPI
from api.example import example_router
import uvicorn
app = FastAPI()
#-------------张昕浩---------------
app.include_router(example_router)
#-----------主程序----------------
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=23333)