Flask programming exercise from progbook.org to control a music player remotely
To run it you need Python3 and mpv.
- $ . venv/bin/activate
- $ export FLASK_APP=hello.py
- $ flask run --host=0.0.0.0
- Check your local network ip address (e.g. 192.168.1.245)
- Open a browser on another device and go to that address with ':5000' at the end (e.g. http://192.168.1.245:5000)
- You should get a page with two buttons to start and stop playing music
- type 'deactivate' on the host computer to exit the virtual environment