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

我是一个甜甜的大橙子,欢迎关注✉️!
我相信技术的力量
努力将所学分享给大家
你的点赞❤️分享收藏就是对我最大的鼓励!

在用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()

你可能感兴趣的:(大橙子的Flask实战,flask,WSGI,python)