1.0.4 • Published 2 years ago

session-xp v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

session-xp



Installation

$ npm install session-xp

Example

const app = require("express")()
const session = require("express-session")
const sessionXp = require("session-xp")
const mongoose = require("mongoose")
mongoose.connect(process.env.MONGODB_URI);
app.use(
  session({
    secret: "keyboard cat",
    store: new sessionXp({
      /* All options are optional */
      collection: "sessions",
      dbname: "myotherdbname",
      /* How to use expires option:
      https://date-fns.org/docs/add */
      expires: { days: 7 },
    }),
    /* About resave and saveUninitialized:
    https://stackoverflow.com/a/40396102/15275415 */
    saveUninitialized: false,
    resave: false,
  })
)
app.listen(3000)
1.0.4

2 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago