在用flask进行开发的时候,突然看到有如下警告
* Serving Flask app "5star" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
解决问题的关键就在于
Use a production WSGI server instead.
很快搜到了解决方案:
if __name__ == '__main__':
server = make_server('127.0.0.1', 5000, app)
server.serve_forever()
app.run()