How to run a flask app on a remote server from a local system?

耗尽温柔 提交于 2019-12-11 11:48:59

问题


I'm able to run the flask app on the local system using app.run(). But when I try to run it on remote server using app.run(host='0.0.0.0',port='81') or app.run(host='<remote ip>'),both don't work. I want to know if something else has to be done.


回答1:


The problem is not from Flask,

The IP specified in app.run(host='0.0.0.0') must be owned by your server.

If you want to launch Flask on remote server, deploy the code on that server using SSH and run it using a remote session.



来源:https://stackoverflow.com/questions/31889124/how-to-run-a-flask-app-on-a-remote-server-from-a-local-system

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