···11-# xcvr-backend11+# xcvr-backend
22+a backend service that allows the dynamic creation of lrc servers. see it live at [xcvr.chat](http://xcvr.chat/)
33+44+this is just the backend, for a frontend, consider using [xcvr](https://github.com/rachel-mp4/xcvr/)
55+66+## how to run
77+```{bash}
88+$ cd server
99+$ go run ./cmd
1010+```
1111+1212+## how to deploy
1313+1. install nginx
1414+2. copy xcvr.conf to /etc/nginx/conf.d/ (change the server_name directive to your domain name)
1515+3. copy static files to /var/www/xcvr/ (if using xcvr for your frontend, then copy the contents of the dist directory generated by `npm run build` to the /var/www/xcvr/)
1616+4. start nginx
1717+5. run xcvr-backend
1818+1919+## endpoints
2020+GET http://localhost:8080/xrpc/getChannels - gets a list of all active channels
2121+2222+POST http://localhost:8080/xrpc/initChannel - accepts json containing metadata about a channel and creates it
2323+2424+## servers
2525+servers are served on ephemeral ports at ws://localhost:PORT/ws
2626+2727+in production, their ports are exposed as ws://xcvr.chat/PORT/ws, which gets proxied to ws://127.0.0.1:PORT/ws