Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a flask application of server

Tags:

python

flask

I have a flask application, and when I run it after copying the files to the server the usual message is displayed,

* Running on http://127.0.0.1:5000/
* Restarting with reloader

But when I go to my server's ip address(port 5000), ie http://162.XXX.XXX.XX:5000, I see nothing there.

Where does the server deploy the flask application ?

like image 530
Tomarinator Avatar asked Dec 26 '22 15:12

Tomarinator


1 Answers

Found the solution, instead of app.run() in the last line, changed that to app.run(host='0.0.0.0'), which basically tells flask to listen to all public IP's

Source

like image 170
Tomarinator Avatar answered Dec 28 '22 10:12

Tomarinator