This repository contains the back-end code for a very basic WebSocket based audio playback snychronization prototype. See the front-end repository for further information.
A simple WebSocket server built with Warp and Tokio. Broadcasts incoming messages to all connected clients.
Build and run:
cargo run
By default the WebSocket endpoint will be served on port 8000. The optional argument can be used to specify an alternative port:
cargo run -- $PORT
The repository contains a basic (multistage) Dockerfile that can be used to build and deploy the backend. To make the docker image work with Heroku, the port has to be passed in via the $PORT
environment variable instead of using the EXPOSE
instruction. See this article for further information.