A simple redis store of koa-session
$ npm install koa2-session-redis
Simple example.
const session = require('koa-session');
const RedisStore = require('koa2-session-redis');
const Koa = require('koa');
const app = new Koa();
//...
const CONFIG = {
/* other options */
store: new RedisStore()
};
app.use(session(CONFIG, app));
//...
RedisStore#constructor(config)
config
The config argument passed to createClient(config)
of node_redis
MIT