For a basic 'hello world' webpage using flask, I'm trying to change the default host:port on the flask server from 127.0.0.1:5000 to something else using a config file. I have created a config file with just the following setting:
SERVER_NAME = '127.0.0.23:5001'
and accessed it in the python file using app.config.from_pyfile(filepath...):
I am starting the flask server using 'flask run', but when I try to access the webpage using a browser on the new host/port, it says unable to connect. I can't access the webpage on the default host/port (127.0.0.1:5000) either.
I've also tried running the flask server using app.run() (and running as a regular python script) instead of 'flask run' and the host/port change works correctly using the same config file, but how can I get it to work using 'flask run'?
My flask version is 1.0.2 and python is 3.7.1 running on Ubuntu.