Skip to content

Instantly share code, notes, and snippets.

@Rishabh570
Created May 11, 2022 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rishabh570/35c5ed24d70d93d2a30f518e109285b0 to your computer and use it in GitHub Desktop.
Save Rishabh570/35c5ed24d70d93d2a30f518e109285b0 to your computer and use it in GitHub Desktop.
const MongoStore = require('connect-mongo');
const { databaseURL, databaseName } = require('@config');
module.exports = {
run: () => MongoStore.create({
mongoUrl: databaseURL,
dbName: databaseName,
stringify: false,
autoRemove: 'interval',
autoRemoveInterval: 1 // In minutes
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment