web socket server for hosting a zone
rebuild zone after updating:
npm install
npm run build
run zone;
npm start
zone responds to interrupt by saving the current state (playlist, bans, blocks) and shutting down
pkill -INT -f "zone server"
zone currently takes config via environmental variables:
export PORT=443;
export AUTH_PASSWORD=scooter;
export LIBRARY_ENDPOINT=http://127.0.0.1:4000/library;
export YOUTUBE_ENDPOINT=http://127.0.0.1:4001/youtube;
export YOUTUBE_AUTHORIZATION="Bearer some_token";
zone relies on zone-library and zone-youtube repos for media
GET /?q=search%20terms
list/search/filter library
GET /:id
json metadata for a particular library item e.g { mediaId: "some_id" title: "demo song", duration: 30000, src: "https://example.com/demo-song.mp3" }
GET /:id/status
json string for availability of a particular library item e.g "available"
"none"
"failed"
"requested"
POST /:id/request
request a particular library item be made available for playback