I'm not sure if this is Flask specific, but when I run an app in dev mode (
Add a parameter to your
app.run(). By default it runs on localhost, change it to
app.run(host= '0.0.0.0') to run on your machines IP address.
Documented on the Flask site under "Externally Visible Server" on the Quickstart page:
Externally Visible Server
If you run the server you will notice that the server is only available from your own computer, not from any other in the network. This is the default because in debugging mode a user of the application can execute arbitrary Python code on your computer. If you have debug disabled or trust the users on your network, you can make the server publicly available.
Just change the call of the
run()method to look like this:
This tells your operating system to listen on a public IP.