The bare server we will start with is server.py and the final reference implementation is reference_server.py.
First, make sure you have Python 3.X, then install the requirements with pip install -r requirements.txt.
Now, to run the server, type python server.py in your terminal and then go to your browser at 127.0.0.1:5000.
NOTE: You might need to have CORS disabled or a CORS plugin enabled (For example, on Chrome you can use https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?utm_source=chrome-app-launcher-info-dialog).
Thanks to Miguel Grinberg for his original tutorial on this which I modifed.