-*- mode: org; mode: visual-line; -*-
MIDI note echoing between browsers using WebSockets. Server written in Python
Flask server. Python 2 is fine (and Python 3 virtual environments are broken in macOS.) Create and activate a virtual environment:
virtualenv ~/Desktop/venv2
. ~/Desktop/venv2/bin/activate
Install packages:
pip install flask
pip install flask-socketio
pip install flask-cors
(flask-cors
to temporarily enable cross-scripting - see here.)
See main.py
for running instructions (either locally, or deployed).
Client ClojureScript/Javascript code gets planted from the websocket-midi-cljs
project (see its deploy.sh
). In development, the code here will attempt to connect to ws://localhost:3449
.
- instructions. Boilerplate for deploying the “getting started” Python app:
heroku login git clone https://github.com/heroku/python-getting-started.git cd python-getting-started heroku create git push heroku master
- Looking through the Gunicorn guide. Need to add Gunicorn to deps, and Eventlet:
pip install gunicorn pip install eventlet
- Dump out to
requirements.txt
:pip freeze > requirements.txt