Skip to content

Commit 5a47396

Browse files
committed
Update main.py
1 parent a3b303a commit 5a47396

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,10 +1227,8 @@ async def catch_all(path_name: str, request: Request):
12271227
return app
12281228

12291229

1230-
def run_server(host="0.0.0.0", port=8000):
1231-
app = create_app()
1232-
uvicorn.run(app, host=host, port=port)
1233-
1230+
app = create_app()
12341231

12351232
if __name__ == "__main__":
1236-
run_server()
1233+
# 本地直接运行 python main.py 时的入口
1234+
uvicorn.run(app, host="0.0.0.0", port=8000, access_log=True)

0 commit comments

Comments
 (0)