1

I am running Flask app on Linux EC2 with:

FLASK_APP=hello-flask.py FLASK_DEBUG=1 python -m flask run  --port 3000

It starts normally and I can ping it with curl localhost:3000 and get response from flask.

However when going to IP:3000 (ip of a server) - it denies access (error shows connection refused).

But when running e.g. NodeJS app on same port 3000 - I can access to it from outside (IP:3000).

What could be the problem with Flask?

Joe
  • 10,493
  • 23
  • 85
  • 159

1 Answers1

1

Found the answer so just posting.. Should be added --host=0.0.0.0 when starting the app.

Joe
  • 10,493
  • 23
  • 85
  • 159