7
votes

With Flask 0.11 it is highly recommend to run the dev server from the command line, however, I cannot figure out how to change the host. I need to access this externally so previously I used app.run(host="0.0.0.0") which worked fine, but I can't find the equivalent for running this from the command line. I tried setting app.config["SERVER_NAME"] = "0.0.0.0" but the dev server isn't picking this up.

1

1 Answers

5
votes

You can run with --host option

flask run --host='0.0.0.0'

To see all available options

flask run --help