I am attempting to run a basic python flask app on my localhost.
I ran the following code:
app = Flask(__name__)
@app.route('/')
def start():
return "starting the app"
if __name__ == '__main__':
app.run(debug=True)
I get the following message:
Serving Flask app "app" (lazy loading)
Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
Debug mode: on
Restarting with stat
Debugger is active!
Debugger PIN:
Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)*
I get a ERR_CONNECTION_REFUSED / localhost refused to connect message when I try to load the page.
I have tried loading the url in multiple browsers, and I have tried turning off my firewall (windows defender).
I have also tried
app.run(debug=True, host = '0.0.0.0')
then running with my IP address.
Can anyone recommend anything else to try? Thanks.