Add FastAPI wechat app: config, wechat handler, run scripts, requirements, env template

This commit is contained in:
gjm committed 2026-09-25 20:58:11 +08:00
1 parent b193b29e3a
commit a2185104ad
8 files changed
+249 -7

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
"""
服务器部署启动脚本
使用方法:
source venv/bin/activate
python run_server.py
或者配成 systemd 服务(后面会做)
"""
import uvicorn
if __name__ == "__main__":
uvicorn.run(
"wechat:app",
host="127.0.0.1", # 只监听本地,由 Nginx 反向代理
port=8000,
reload=False, # 生产不开 reload
workers=1, # 2G 内存跑 1 个 worker 够了
)