Nerd For Tech
Published in

Nerd For Tech

Get started with MongoDB Atlas

This article will guide you on how to get started with MongoDB Atlas.

  1. Visit MongoDB Atlas

2. Click on Start Free and Complete the form with your email, name, password, accept terms of services and hit the button that says Get started free

3. Then you will be taken to a new page. There you will see a button that says Build my first cluster

4. Towards the end of the page, you will see the Cluster Name row. Click on that to enter the name for your new cluster/database. Give a name for your cluster and hit the button that says Create Cluster

5. Towards the left sidebar, you will see the name of your Cluster along with few options such as CONNECT, METRICS, COLLECTIONS.

6. White List IP in Mongo Atlas, first click on the left sidebar Network Access under Security

Then you will see the following window popup. Here enter 0.0.0.0/0 as whitelist entry. This will allow users to use our mongo atlas cluster from any IP address. Once done, click Confirm.

7. Create Database User with Name and Password

You need to create a database user to be able to use this service. This is not your login user and password but a different one. It will be used to allow access to the particular mongo cluster that you have just created. Click on Database Access under Security in the left sidebar and on the following popup window, enter the user name and password.

8. Get Connection URI String

Now its time to finally get the connection URI string that will allow our app to use mongo atlas as a database service in the cloud. Click on Clusters on the left sidebar under Atlas on top. You will see a popup window. Click on the option that says Connect your application

9. Click to copy the Connection String.

10. Go to your project and create a file with the name .env in the root of the project (this step is explained in the previous lecture). nodeapi/.env and add the connection string that you just copied and paste to MONGO_URI

You will need to replace the <password> part with the actual password you used earlier to create a MongoDB User, Update <password> with your actual password. In the following example, you can see my password kkkkkk9

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store