-1

I've been searching around and haven't found quite what I'm looking for, granted, it's an odd request.

How do I take my moderately complicated flask app using flask_script Manager from being local only to being able to be accessed anywhere on my local network?

My manager seems to think it's as simple as changing "host = 127.0.0.1" to something else.

ChootsMagoots
  • 670
  • 1
  • 6
  • 19

1 Answers1

0

127.0.0.1 is a local loopback address for your own use.

simply change it to 0.0.0.0 and it will bind to your host and expose it so that other machines can access it from your LAN

Of course, if you want machines to access it from the rest of the internet (WAN). You'll have to setup port forwarding on the machines default gateway.

mental
  • 836
  • 6
  • 18
  • So how do I find the IP he'll need to use? Then he'll access a specific port I can set... do I need to open a port somewhere in my computer's settings? Thank you – ChootsMagoots Jan 18 '18 at 00:07
  • On windows you can run `ipconfig` in the command prompt and it should be under `IPv4 Address`, On linux you can run `ifconfig` and it would either be under `eth0` or `wlan0` then `inet xxx.xxx.xxx.xxx` – mental Jan 18 '18 at 00:14
  • If you use *nix OS when run `ifconfig` in the terminal and find ip for the default interface (usually one of `et0`/`eth0`/`wlan`). This is your IP in the local network. You can use it as url. Don't forget to add port to url. – Tural Gurbanov Jan 18 '18 at 00:15
  • Wow, easier than I thought. I'm going to make some edits and clean this up for posterity – ChootsMagoots Jan 18 '18 at 00:25