wsrelay
Basic pub/sub websocket server following a JSONRPC-ish format.
Running
- Install dependencies:
yarn
- Run the server:
yarn start
Using
- Subscribe to a topic
> { "method": "subscribe", "params": [ "topicA", "topicB", "topicC" ] }
< {"id":0,"result":"Success"}
- Publish to a topic
> { "method": "publish", "params": [ "topicB", "Hello, world!" ] }
< {"id":0,"result":"Success"}
- Receive the message
< {"id":-1,"result":["topicB","Hello, world!"]}