Closed godruoyi closed 8 years ago
@godruoyi You can put your connection code in the constructor function of your custom store. :)
i whant use mongodb as session store, but i down't know how to connect it sach as :
//app.js
import session from "koa-session2";
import {Store} from "koa-session2";
......
// here, i whant use mongodb as session store, how to set it ....
app.use(session({
key: 'settings.sessionkey',
store: new Store()
}));
@godruoyi You can write your class of store with extending koa-session2 store, and write you connection code in the constructor function of the store class, just like the example in README. :)
Please help me?