Skip to content

Commit

Permalink
fix: πŸ› fix for mongodb connection
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricesemti80 committed Jan 24, 2023
1 parent f4bd44c commit 1cfe086
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const exphbs = require('express-handlebars')
const methodOverride = require('method-override')
const passport = require('passport')
const session = require('express-session')
const MongoStore = require('connect-mongo');
const MongoStore = require('connect-mongo')(session);
const connectDB = require('./config/db')

// Load config
Expand Down Expand Up @@ -73,7 +73,7 @@ app.use(
secret: 'keyboard cat',
resave: false,
saveUninitialized: false,
store: MongoStore.create({mongoUrl: process.env.MONGO_URI,}),
store: new MongoStore({ mongooseConnection: mongoose.connection }),
})
)

Expand Down

0 comments on commit 1cfe086

Please sign in to comment.