What I need is to run a web app that can only be accessed from my local network.
I built my web app with flutter by typing:
flutter build web
but now I'm stuck because I don't know which web server should I use. I searched for tutorial but didn't find a solution.
The easiest for me was by serving the web build using Python as suggested on this post. Once you got Python installed on your machine, navigate to your Flutter project's build/web/
folder then run python -m http.server {PORT}
. You can change the port to any free port available in your machine. If you've installed Python 3, the command most likely should start with python3
.
When the server's running, the Flutter web build can be accessed through a browser with the machine's IP address and the port that you've set i.e. http://192.168.x.x:8080
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With