mjbondra / koa-session-mongoose

Mongoose store for Koa sessions
MIT License
29 stars 8 forks source link

Koa Generic Session says use "Koa-session" instead #11

Closed cpres closed 6 years ago

cpres commented 7 years ago

When I try to implement koa-session-mongoose within koa-session it errors out:

app.use(session(app, {store: new MongooseStore()}));

app.use((0, _koaSession2.default)(app, { store: new _koaSessionMongoose2.default() }));
                                                ^

TypeError: _koaSessionMongoose2.default is not a constructor

I'm not sure if the issue resides on koa-session or this module, but your documentation isn't helping me figure out the best way to implement koa-session-mongoose on koa-session. Which is now the session module koajs is suggesting we use

mjbondra commented 6 years ago

Use the latest release (koa-session-mongoose@^2.0.0) for koa-session support. The code examples in the readme file should give you a pretty good idea of how to proceed.