koajs / generic-session

koa session store with memory, redis or others.
MIT License
414 stars 65 forks source link

generic session is not compatible with --harmony when no session operated #99

Closed lookis closed 4 years ago

lookis commented 8 years ago

version 1.11.3 node v6.5.0 test case:

var session = require('koa-generic-session'); var redisStore = require('koa-redis'); var koa = require('koa'); var app = koa(); app.keys = ['keys', 'keykeys']; app.use(session({ store: redisStore() })); app.use(function *() { switch (this.path) { case '/get': this.body = {"hello": "world"} } }); app.listen(8080);

and run the script with node --harmony

and visit http://127.0.0.1:8080/get