MongoDB and Mongoose - Install and Set Up Mongoose - confused about mlab

This is the url I got so far:

but I saw others have instead of '`. Am I doing something wrong? Or the instruction is somehow outdated?

instructions are outdated but don’t worry about different url - you can still continue with challenges.

MLab was acquired by MongoDB.

Thanks @orvalho. I had some difficulties to continue with the url I have. But I will keep trying. At least now I know the url is fine.

1 Like

Good luck! If you get stuck - ask away.

Hi @orvalho, I am still a little confused:
Here’s the connection string I got:
mongodb+srv:// admin : <password>

Why it points to test? I saw others’ link and they seem to have a user defined names. Do I need to do something more after the mongodb cluster is up and running? For example, create a table inside the instance?

And what is the +srv part? Do i need to remove it?

you need to:

  1. create a new user (username and password will then need to go into that url)
  2. whitelist all IPs

regarding “test” and “+srv” - I have those in all urls of my projects (have not looked into what “test” and “+srv” mean - but that’s not the problem)

Hi @orvalho, I managed to connect to the mongodb. The reason I failed before was that the white-list all ips is not done correctly.

Now I am stuck at the create a model step : “Cannot read property ‘modelName’ of undefined” .

Not sure what to do to fix the code. Could you please take a look at my project? Thank you very much!

congrats on connecting to Database!

you have written a Schema but have not written a Model.


You gonna want to look into Mongoose docs on how to create a Model. Here’s the link:

Hah, tried several things and finally passed this challenge! Thank you @orvalho!
The instruction is kinda vague but now I know the model has to be called “Person”.

1 Like