var session = require('koa-generic-session');
app.keys = ['key', 'keySid'];
app.use(session());
app.use(routes.get("/test", function *(next){
//How to use session in this context ?
this.session.set('aaa', 100);//report set undefined
// or
this.session.aaa = "100";// not report error ,but i can't get aaa value like this.session.aaa
var session = require('koa-generic-session'); app.keys = ['key', 'keySid']; app.use(session());
app.use(routes.get("/test", function *(next){ //How to use session in this context ? this.session.set('aaa', 100);//report set undefined // or this.session.aaa = "100";// not report error ,but i can't get aaa value like
this.session.aaa
}));