server for the socketmusic series of projects (such as socketMusic:wireless)
abstracting out the server from my previous socketmusic:wireless project and moving to a new build system of ClojureScript compiled by shadow-cljs to run on node.js
- to install shadow-cljs:
npm install -g shadow-cljs
express
socket.io
node-osc
- hosted osc server is at port
33333
- outgoing osc messages are on port
11111
- website is hosted on port
3000
- the root directory of the hosted website is passed as the first arg
- defaults to
default-page/
folder
- defaults to
- running the app:
node socketmusic.js [webpage dir]
format for osc messages sent to the osc server
/debug [args]
prints the args to the console/client-list
sends out base64 client list on osc output port on address/client-list
/num-clients
sends the number of clients on osc output port on address/num-clients
/ws/all [event-name] [opt. args]
broadcasts named event with args bundled in array format to all clients/ws/client-idx [client-idx] [event-name] [opt. args]
- trigger named event with args bundled in array format to client at given index of client-list/ws/client [client] [event-name] [opt. args]
- trigger named event with args bundled in array format to specified (in base64) client/ws/rand-client [event-name] [opt. args]
- trigger named event with args bundled in array format to random client
- compile:
shadow-cljs compile app
- watch:
shadow-cljs watch app
- build:
shadow-cljs build app
gpl v3