mirror of
https://github.com/stardrophere/InsightRadar.git
synced 2026-06-05 23:32:49 +08:00
修改env,添加port
This commit is contained in:
+7
-1
@@ -1,12 +1,18 @@
|
||||
# run.py
|
||||
import uvicorn
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
load_dotenv()
|
||||
PORT = int(os.getenv("PORT", 8000))
|
||||
|
||||
# 启动服务
|
||||
uvicorn.run(
|
||||
app="app.main:app",
|
||||
host="0.0.0.0",
|
||||
port=8000,
|
||||
port=PORT,
|
||||
# reload=True,
|
||||
workers=1
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user