FastAPI 应用(app.py):from fastapi import FastAPI app = FastAPI() @app.get("/healthz") def healthz(): return {"ok": True} @app.get("/api/ping") def ping(): return {"pong": True} 生产启动(Linux 示例):gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 \ --timeout 60 --keep-alive 5 app:app

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部