python - Can't connect to Flask web service, connection refused -


i'm trying run simple web server on raspberry pi flask. when run flask app, says:

running on http://127.0.0.1:5000/

but when enter address on laptop's in chrome,

err_connection_refused

i can open 127.0.0.1:5000 on raspberry pi's browser. need connect computer?

run app this:

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

it make server externally visible. if ip address of machine 192.168.x.x then, same network can access in 5000 port. like, http://192.168.x.x:5000


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -