-
Go to MongoDB cloud atlas
-
Sign up if you don't have an account already or log in if you have one already. PS: If you don't want to use your email, go to https://temp-mail.org/en/ and generate a temporary disposable email address uwu)/
-
Create a new cluster on Mongo Atlas. [It takes time, so don't worry]
-
After creating a cluster, click on the 'CONNECT' button on the cluster which you've created.
-
On Setup connection security, I'd recommend you to add 'Your Current IP Address' for security concerns but if you are not willing to go through a little bit of pain, then simply add 'Access from anywhere. Also, you can change this anytime by opening your "IP Access list tab".
-
Then, create a database user, fill up the name and password and MAKE SURE TO REMEMBER THEM.
-
Click on the "Choose a connection method" and then click on the "Connect Your Application" option.
-
Finally, on the "Connect" tab select "Nodejs" as DRIVER with "3.6 or later" in VERSION.
-
Copy the connection string that is provided below and paste it somewhere and replace with 'the password you added while creating database user', also make sure to remove '< >' these from . This will be your MONGO CLUSTER URI.
mongodb+srv://NekoDaKamiSama:kamisamaofdaculture@cluster0.v93qb.mongodb.net/myFirstDatabase?retryWrites=true&w=majority
- That's it You now have a MongoDB cluster hosted on Mongo-Atlas. You can use this cluster for other projects too.