Tell us what’s happening:
I’ve done all the necessary steps. My password is correct as well I don’t know why I can’t connect to mongoose.
Repl: https://repl.it/@akshitchaturved/boilerplate-mongomongoose
Your code so far
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/13.1.3 Safari/605.1.15
.
Challenge: Install and Set Up Mongoose
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
What is the error that you get? If you console.log(process.env.MONGO_URI); what do you get?
When I add console.log(process.env.MONGO_URI);
to myApp.js I’m getting mongodb+srv://user:<Shreya02>@cluster0.mdtag.mongodb.net/<dbname>?retryWrites=true&w=majority
.
As for the error here is the screenshot:
lasjorg
December 15, 2020, 6:10pm
4
Don’t you need to remove the <>
from the password?
1 Like
Yeah, I wasn’t sure if that’s the real string or he edited it, but that definitely looks odd to me. And the DB name.
1 Like
lasjorg
December 15, 2020, 6:48pm
6
Yep, the DB name also looks like a placeholder.
I don’t know that what DB service you are using, but I seem to remember from when I was using mlab that it would give me the uri for specific DBs.
The <> in the password was the problem. I didn’t change the dbname, yet I somehow passed the test. Thanks a lot for the help guys
1 Like