IkerSS
September 20, 2021, 6:25pm
1
Tell us what’s happening:
The test “Database connection should be present.” keeps failing. The console shows nothing. The preview shows a “Cannot /get” message. All IPs have been whitelisted on the Atlas website (0.0.0.0/0).
The MONGO_URI is included in the .env variables.
Any help would be immensely appreciated.
Your project link(s)
solution: https://replit.com/@ikersuarez/boilerplate-advancednode
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15
Challenge: Implement the Serialization of a Passport User
Link to the challenge:
Sky020
September 20, 2021, 6:43pm
2
Hello there,
You appear to have forgotten to follow this instruction:
Be sure to uncomment the myDataBase
code in deserializeUser
, and edit your done(null, null)
to include the doc
.
Hope this helps
IkerSS
September 20, 2021, 6:54pm
3
Hi, thanks for your help! I don’t see the deserializer commented, though (unless I’m mistaken and it’s a different part of the code).
Sky020
September 20, 2021, 8:16pm
4
Apologies, I was mistaken. That code is as expected - I misread the instruction
When I fork you project, and input my URI, I see this error in the console:
Error: secret option required for sessions
at session (/home/runner/boilerplate-advancednode-2/node_modules/express-session/index.js:200:12)
Have you set the SESSION_SECRET
?
Otherwise, this is the main issue:
res.render('pug', {
title: 'Connected to Database',
message: 'Please login'
});
Your code:
res.render('pug', {
title: 'Connected',
message: 'Please login'
});
Hope this helps
1 Like
IkerSS
September 20, 2021, 8:26pm
5
It was the title. Thanks!
system
Closed
March 22, 2022, 8:26am
6
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.