I have no idea what's going wrong

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:

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:

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

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 :smiley: :+1:

1 Like