In this article, I am assuming that you have a bit knowledge of MongoDB locally.
Here I will be guiding you How can you use MongoDB Atlas in your website?
So, the prerequisite is some knowledge of MongoDB database, but don't worry if you don't have you can follow this MongoDB docs 👇
In this article, my main focus will be in MongoDB Atlas. So, let get started …
The very 1st step you have to do is go to MongoDB Atlas https://www.mongodb.com/cloud/atlas and sign-up.
You can skip 👇 this process as well, it's totally up to you!
Boom🎇, you created your very 1st cluster 😀
Click on connect with mongo shell.
If you haven't downloaded the mongo shell before, go through the specified link and download it 1st, its easy and straight forward process.
And open your CMD/ hyper/ git bash anything which you generally use and paste the URL(not required to any specified directory, it will work fine in any directory).
It will ask for password so after entering the password which you initially set, that time I told you that keep safe that password right?
It required here for the mongo DB atlas connection!
If all steps you follow correctly, then you will see this kind of thing in your CMD:
So, Congratulation, you made your connection with MongoDB atlas.
So, the next step is … go to collection in cluster and create your own database and test whether it is working or not!
Here, I am showing you with sample datasets, but you can also create your database, after getting some idea with sample dataset definitely you can create your own database and test it with your mongo shell!
Now, you will be seeing that in your cluster number of sample databases are created, right?
Just go to mongo shell and type:
Now you will be seeing all the sample databases which are present in your MongoDB cluster:)
Now, you can also create your database and collection and do test with that as well.
Till now what we did
We created our cluster, connect with mongo shell, created DBs, and tested!
Now, the question arises is that how can we use the database in our website??
So, don't worry!! It's simple(if you have knowledge in MongoDB)
Just go to MongoDB atlas and in cluster go to connect section and
Now copy the URL
Now you can use this URL in your project, just replace this URL with local MongoDB URL.
All done, you set your project with MongoDB Atlas.
Test it and congratulations!