koa-session-object
v1.0.1
Published
use object as session for koa
Downloads
11
Readme
koa-session-object
use object as session for koa
Usage
const session = require('koa-session-object');
const config = {
key: 'koa:sess', /** (string) cookie key (default is koa:sess) */
maxAge: 86400000, /** (number) maxAge in ms (default is 1 days) */
overwrite: true, /** (boolean) can overwrite or not (default true) */
httpOnly: true, /** (boolean) httpOnly or not (default true) */
signed: true, /** (boolean) signed or not (default true) */
};
app.use(session(config));