Python Forum

Full Version: Running Flask web on other IP than 127.0.0.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HI,

I am new in Python and Flask (<1 year exp.).

I followed a tutorial for authentication in Flask there: https://www.digitalocean.com/community/t...lask-login


However, I cannot figure out how to listen on to another IP than 127.0.0.1

I tried this:

export FLASKAPP=“myAppName”; export FLASKDEBUG=1; flask run –host=0.0.0.0:8080
and that

if name == “main”:
app.run(host=‘0.0.0.0’, port=8080, debug=True)
Unfortunately, I was not successful.

Note that the app is running fine on 127.0.0.1

Any idea?

Thanks.

P.