Can’t connect to Flask web service, connection refused

Run your app like this:

if __name__ == '__main__':
    app.run(host="0.0.0.0")

It will make the server externally visible. If the IP address of the machine is 192.168.X.X then, from the same network you can access it in 5000 port. Like, http://192.168.X.X:5000

Leave a Comment