flask中 app.run(host='0.0.0.0', port=5000, debug=False) 不能用外网ip访问的解决办法

pycharm 2018开启debug模式和修改host:

Pycharm 2018中,如果想要开启debug模式和更改端口号,则需要编辑项目配置。直接在app.run中更改是无效的。示例图如下: 

将  app.run()  改成  app.run(debug=False) 


保存文件,重新运行,就可以了。

猜你喜欢

转载自blog.csdn.net/james_laughing/article/details/88714116
今日推荐