Search code examples
pythonflaskip-addresscs50

flask won't run outside of localhost


I'm sorry this question has been asked before and answered.

The flask app does not serve outside of the local host network.

This is what I've tried before.

ipconfig

What I've Tried

  1. Inbound rule change to allow port 5000.
  2. Changing port to 80 and then to 33 to test
  3. set host to 0.0.0.0
  4. Tried all with app.run(host=) method and cmd line interface

is it something I'm not seeing yet. Please help. Thank you in advance.


Solution

  • You'll need something like ngrok to transfer outside connection to your localhost. Say you are running flask at 8080. Then to access it you'll need ngrok and the command will be ngrok http 8080. This will give another address which can be used to access flask on your localhost. Also, there are many alternates to this method, but ngrok is quick and easy.