Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

You must provide either mongoUrl|clientPromise|client in options

const session = require('express-session');
const MongoStore = require('connect-mongo').default;

app.use(
  session({
    store: MongoStore.create({ mongoUrl: process.env.MONGO_URI }),
    ...options
  })
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #You #provide #options
ADD COMMENT
Topic
Name
6+4 =