Closed zaynv closed 6 years ago
For example, can I use something like https://www.npmjs.com/package/connect-pg-simple for my store that I pass to the session config, or do I need to manually create it like this:
store
const store = { set(key, sess, maxAge, { rolling, changed }) { // do INSERT query or UPDATE query depending on if session exists already }, get(key, maxAge, { rolling }) { // SELECT query }, destroy(key) { // DELETE query } } app.use(session({ store }, app))
you can't use connect-pg-simple directly because it has the different interface, maybe you can wrap it to fit the interface koa-session required.
For example, can I use something like https://www.npmjs.com/package/connect-pg-simple for my
store
that I pass to the session config, or do I need to manually create it like this: