Logux Redis store, to be used with logux-server.
const Server = require('logux-server').Server
const RedisStore = require('logux-store-redis');
const app = new Server(
Server.loadOptions(process, {
subprotocol: '1.0.0',
supports: '1.x',
root: __dirname,
store: new RedisStore(/* configuration */)
})
)
app.auth((userId, token) => {
// TODO Check token and return a Promise with true or false.
})
app.listen()
This module uses ioredis, and the confguration is passed as is.