今天做一名stackoverflow的搬运工。
找了很久没找到生产环境下waitress的启动方式,所以贴到csdn来。
app1.py
from flask import Flask
app = Flask(__name__)
# app.run(host='0.0.0.0', port=8080,debug=True)
run.py
from waitress import serve
import app1
serve(app1.app, host='0.0.0.0', port=8080)
启动方式
python run.py
是不是很简单
原文地址
https://stackoverflow.com/questions/51045911/serving-flask-app-with-waitress-on-windows/52093761#52093761