Skip to content

Commit 9ff1921

Browse files
kheftelsaintedlama
authored andcommittedJul 14, 2019
chore: update login example dependencies (#281)
old version of mongoose was causing errors while accessing a local mongodb install on macOS high sierra
1 parent faa856a commit 9ff1921

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed
 

‎examples/login/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ passport.serializeUser(Account.serializeUser());
3838
passport.deserializeUser(Account.deserializeUser());
3939

4040
// Connect mongoose
41-
mongoose.connect('mongodb://localhost/passport_local_mongoose_examples', function(err) {
41+
mongoose.connect('mongodb://localhost/passport_local_mongoose_examples', { useNewUrlParser: true }, function(err) {
4242
if (err) {
4343
console.log('Could not connect to mongodb on localhost. Ensure that you have mongodb running on localhost and mongodb accepts connections on standard ports!');
4444
}
4545
});
46+
mongoose.set('useCreateIndex', true);
4647

4748
// Register routes
4849
app.use('/', require('./routes'));
@@ -78,5 +79,4 @@ app.use(function(err, req, res, next) {
7879
});
7980
});
8081

81-
8282
module.exports = app;

‎examples/login/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
"start": "node ./bin/www"
77
},
88
"dependencies": {
9-
"body-parser": "~1.8.1",
9+
"body-parser": "^1.19.0",
1010
"cookie-parser": "~1.3.3",
1111
"cookie-session": "^1.1.0",
1212
"debug": "~2.0.0",
13-
"express": "~4.9.0",
13+
"express": "^4.17.1",
1414
"jade": "~1.6.0",
15-
"mongoose": "3.8.x",
16-
"morgan": "~1.3.0",
17-
"passport": "0.2.x",
15+
"mongoose": "^5.6.4",
16+
"morgan": "^1.9.1",
17+
"passport": "^0.4.0",
1818
"passport-local": "1.0.x",
19-
"passport-local-mongoose": "*",
20-
"serve-favicon": "~2.1.3"
19+
"passport-local-mongoose": "^5.0.1",
20+
"serve-favicon": "^2.5.0"
2121
}
2222
}

0 commit comments

Comments
 (0)
Please sign in to comment.