Go to https://www.mongodb.com and click
Try Free
buttonClick on signup with Google or fill out the given form and accept permission
Fill in the answer to all questions { you can select any options according to your own thought}
You can see an interface like this
Click on
Create
button to create a new deployment environmentSelect
M0 FREE
database package as shown below:You can also select other Region for better performance
Give the Name of your Cluster, then click
Create
Also, please Create a username and Password of your choice, copy the password, and save it to Notepad for further use
After copying click on
Create User
buttonHere click
Add My Current IP Address
and thenFinish and Close
After some time your Cluster will be ready and look like when you click
Database
at the left barAfter that Click
Connect
and do followingClick
MongoDB for VS Code
Copy the marked command and close the terminal
Now open the VS code and go to the Extensions to download
Now you can see the symbol of MongoDB at the left sidebar
Click
Add Connection
-> thenConnect
Paste the copied command from above and replace <password>, then the new command looks like the following
Press enter. MongoDB connected Successfully
Create Database
Click
(+)
icon and it automatically opens a fileEdit the file as follows and run by pressing the play button at the top right corner
Now you can use MongoDB with ease.