0.0.2 • Published 6 years ago

koa2-session-redis v0.0.2

Weekly downloads
84
License
MIT
Repository
github
Last release
6 years ago

koa2-session-redis

A simple redis store of koa-session

Installation

$ npm install koa2-session-redis

Example

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));
//...

API

RedisStore#constructor(config)

config The config argument passed to createClient(config) of node_redis

License

MIT