npm install ws-broadcast/path (see "Handles room" below)sh
npm i -g ws-broadcast
`You can now start a
ws-broacast or wsb in your any shell.
$3
`sh
ws-broadcast
`This will start an
express Web server and a WebSocket server on default 0.0.0.0:3000 $3
If you want to change the default port use:
`sh
PORT=9090 ws-broadcast
`$3
You can split clients into groups by connecting them to a different path
You just have to append a /path to the server url:ws://localhost:9001/myRoomBy doing so, clients will only be able to communicate with other clients from the same room.
There is no way for clients to communicate with other rooms.
$3
You can also start a ws-broadcast using Docker:
`sh
docker run -d maxleiko/ws-broadcast
``