Adonis Websockets Redis Provider
This project provides listener and publisher for Redis PubSub in terms of adonis-websocket.
Installation
Install addon via:
adonis install adonis-ws-redis-provider
Add provider to start/app.js
:
const providers = 'adonis-ws-redis-provider/providers/WsRedisProvider'
The next step is to open server.js
and register preloader for redis subscriptions.
Fold // <-- add this line
Don't forget that this package relies on adonis-websocket and adonis-redis.
How to use
Instead of
Ws
just publish message like below:
Ws