【Flask】WARNING: This is a development server. Do not use it in a production deployment. falsk WSGI

天涯浪子 提交于 2020-03-12 10:34:15

在用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()
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!