which just adds a convert to my config for session in last project. Generic-session worked well in last project, and convert works well with other koa plugins and our legacy controllers. I tried to debug the app and ctx.session is undefined. Does this have something to do with the middlewares' syntax changing from function* (next) {this.body='res text';} to async function(ctx,next) {ctx.body='res text';}?
My colleague and I just started a new project and decided to use koa2 (used koa1 in last project). For generic session, I now have config like this:
which just adds a
convert
to my config for session in last project. Generic-session worked well in last project, andconvert
works well with other koa plugins and our legacy controllers. I tried to debug the app andctx.session
is undefined. Does this have something to do with the middlewares' syntax changing fromfunction* (next) {this.body='res text';}
toasync function(ctx,next) {ctx.body='res text';}
?