- 先安装依赖
pip install gevent
或pipenv install gevent
- app.py中添加
# app.py 中添加 from gevent import pywsgi if __name__ == '__main__': server = pywsgi.WSGIServer(('0.0.0.0', 5000), app) server.serve_forever()
flask生产环境部署
最新推荐文章于 2024-07-20 22:28:14 发布
pip install gevent
或 pipenv install gevent
# app.py 中添加
from gevent import pywsgi
if __name__ == '__main__':
server = pywsgi.WSGIServer(('0.0.0.0', 5000), app)
server.serve_forever()