5

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 ?

1 Answer 1

11

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

Sign up to request clarification or add additional context in comments.

1 Comment

This Q&A is really useful for containerized versions of Flask as it can be an overlook. The local machine for your Flask app is not really YOUR local machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.