How to continue with Apis and Microservices's MongoDB and Mongoose challenges now that mlab doesn't accept any registrations?

How to continue with Apis and Microservices's MongoDB and Mongoose challenges now that mlab doesn't accept any registrations?
0

HELP! i can’t continue with MongoDB and Mongoose challenges since mLab no longer accepts registration. What should i do?

mLab was bought by MongoDB few months back.

The same service is provided by them called Atlas. https://www.mongodb.com/cloud/atlas It should be intuitive for you to sign up and make a mongodb though.

You will need to create a project, then a cluster inside that project. Notice you can only create a free tier db per project. So whenver you want to create new free dbs, you will need to create a new project.

Go head and create a cluster and name it whatever you want. It will take few minutes to be created.
Then hit Security tab to create a new user to use the database. Switch to IP Whitelist tab to grant access to ip addresses. You can hit add current ip address button or hit allow access from anywhere.

Then comeback to overview tab and hit connect button.

You will be provided a connection string which you can now use in your app. Replace user/password with the db user you just created.

Hope this helps :slight_smile:

1 Like

@shimphillip Hey thanks for the info, i already did that as i have an Atlast account from my lessons with https://university.mongodb.com/ now my problem is the glitch app to which i have pasted the connectiong string get’s rejected on the first lesson here: https://learn.freecodecamp.org/apis-and-microservices/mongodb-and-mongoose/install-and-set-up-mongoose i added the MONGO_URI=my connection string here on the .env file as well as inside the mongoose.connect(connection string here) but i can’t get past the first test.

did you replace the “<password’>’” with your password in the connecting string?

@mav1283

The rejection might be due to allowed access of IP addresses.
Make sure that you are allowing connections that include your specific IP address in the IP whitelist when creating your cluster.

@yakhousam yup i did, maybe the admin who made the test make sure that the MONGO_URI has to be from mlab?

It works with Atlas too as @shimphillip pointed out above, I have a PR to change the instructions heret https://github.com/freeCodeCamp/freeCodeCamp/pull/35927. but no Idea when it will go through the pipeline, in the meantime you can follow the instructions in that PR or here to make it work MongoDB and Mongoose - Install and Set Up Mongoose

@geek4ctrl yep i did, it’s in the process of getting the connection strings so it has to be allowed inorder to finish the setup.

@Dereje1 i followed every detail, setting up mongodb and mongoose. my database name is user here’s my glitch link: https://glitch.com/edit/#!/tasty-lily?path=myApp.js:14:33 but i’m still unable to get past the first test. I keep getting this “mongoose is not connected” . my ip is already whitelisted and the connection string is set.

@Dereje1 I think it’s the ip whitelist thing, it’s weird cause my ip is already whitelisted then i talked to mongodb chat support and he had me check this specific id if i can access it. I think you might want to add this to your PR as it’s suggested by the chat support : https://intercom.help/mongodb-atlas/atlas-faqs/using-dynamic-ip-addresses-with-atlas

I still can’t connect to mongoose and got this from mongodb’s chat support
chatsupport

Thanks for your help guys, i passed the first test by just setting the ip-whitelist to “Access from anywhere”.

@Dereje1 I approved your PR, but will need to have a core team member review and approve too. As the PR you created only affects the current mono repo and not the legacy learn module, I have requested these changes be applied to that repo also and pushed to the current production.

1 Like

thanks @RandellDawson , hopefully the instructions are clear enough to cut-down these mlab related threads

1 Like

@Dereje1 FYI, I got permission to merge the same changes you made on the PR into the current learn site, so now https://learn.freecodecamp.org/apis-and-microservices/mongodb-and-mongoose/ should show the newer instructions you wrote.

Thanks again!

2 Likes