To build a project:
$ cd server
$ npm install
$ npm run buildTo run a server:
$ cd server
$ npm startor in debug mode:
$ DEBUG=server,chat npm startTo run tests:
$ cd server
$ npm testTo run a linter:
$ cd server
$ npm run tslintTo connect with wscat:
$ wscat -c 'wss://localhost:3000/socket.io/?EIO=3&transport=websocket' -nCommands:
| Command | Description |
|---|---|
42["join", {"channel": "room-1"}] |
Join a public channel named "room-1" |
42["join", {"channel": "room-2", "password": "secret"}] |
Join a private channel named "room-2" |
42["message", {"channel": "room-1", "content": "Hello everyone from client 1 to channel 1!"}] |
Send a message to a channel "room-1" |
42["count", {"channel": "room-1"}] |
Get users count in channel "room-1" |
42["leave", {"channel": "room-1"}] |
Leave a channel named "room-1" |