2026-09-25 20:58:11 +08:00
|
|
|
"""
|
|
|
|
|
本地开发启动脚本
|
|
|
|
|
|
|
|
|
|
使用方法:
|
|
|
|
|
python run_local.py
|
|
|
|
|
|
|
|
|
|
或者直接用 uvicorn:
|
|
|
|
|
uvicorn wechat:app --reload --host 127.0.0.1 --port 8000
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import uvicorn
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
uvicorn.run(
|
|
|
|
|
"wechat:app",
|
|
|
|
|
host="127.0.0.1",
|
|
|
|
|
port=8000,
|
|
|
|
|
reload=True, # 代码改动自动重启,开发用
|
|
|
|
|
)
|