Flask Server - olliebennett/raspberry-pi-scripts GitHub Wiki
Flask Python Web Server
Install
We'll need PIP
sudo apt-get install python-pip
Then just install Flask:
pip install flask
Serve!
See flask_server.py
script for an example server.
Importantly, your flask server should use run(host='0.0.0.0')
(and optionally port=80
) so it's accessible beyond the Pi!
sudo python flask_server.py
The server is accessed at raspberrypi.local or using the Pi's IP directly.