# Setup MongoDB for Node project

1. Go to [https://www.mongodb.com](https://www.mongodb.com/) and click `Try Free` button
    
2. Click on signup with Google or fill out the given form and accept permission
    
3. Fill in the answer to all questions { you can select any options according to your own thought}
    
4. You can see an interface like this
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700824652291/21085d75-7d25-4c49-a7d0-70c7a37a3d25.jpeg align="center")
    
    Click on `Create` button to create a new deployment environment
    
5. Select `M0 FREE` database package as shown below:
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700824702215/17434788-400d-449e-9e5c-461c2424ad70.jpeg align="center")
    
    You can also select other Region for better performance
    
    Give the Name of your Cluster, then click `Create`
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700824749128/7ecf8b1d-b8c0-49b3-bb32-d721214b4086.jpeg align="left")
    
6. Also, please Create a username and Password of your choice, copy the password, and save it to Notepad for further use
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700825053978/30180beb-e305-484f-a22e-cd5e99c128a7.jpeg align="center")
    
    After copying click on `Create User` button
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700825164740/e446f8c4-9e68-4414-b686-0f2b141190e3.jpeg align="center")
    
    Here click `Add My Current IP Address` and then `Finish and Close`
    
7. After some time your Cluster will be ready and look like when you click `Database` at the left bar
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700825980048/475ddb12-408e-4e92-8a64-14467db144f9.jpeg align="center")
    
8. After that Click `Connect` and do following
    
    * Click `MongoDB for VS Code`
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700826523026/1a9876bc-313a-4b91-b272-b49e865f7932.jpeg align="left")
        
    * Copy the marked command and close the terminal
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700826583900/2e92c501-845a-4c85-8232-e9c3293f61b8.jpeg align="center")
        
9. Now open the VS code and go to the Extensions to download
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700826007383/ee6f728c-90cc-4ff7-af7e-66159dfb0e68.jpeg align="center")
    
10. Now you can see the symbol of MongoDB at the left sidebar
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700826786523/951e1775-7ebc-45eb-bfc8-bcf2507737d9.jpeg align="center")
    
    * Click `Add Connection` -&gt; then `Connect`
        
    * Paste the copied command from above and replace &lt;password&gt;, then the new command looks like the following
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700827492520/54ba3f94-e8e5-478b-9607-d4f2c5b6a71f.jpeg align="center")
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700827620141/6e93fc74-3f41-4aa0-9993-75983f92f77d.jpeg align="center")
        
        Press enter. MongoDB connected Successfully
        
11. Create Database
    
    * Click `(+)` icon and it automatically opens a file
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700827743254/c11bde66-43bf-4599-bdf5-4d894f00da0b.jpeg align="left")
        
    * Edit the file as follows and run by pressing the play button at the top right corner
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1700827899224/bbb68cb7-5e9e-4a8f-ae14-5fc4aefb6da8.jpeg align="center")
        

Now you can use MongoDB with ease.

# <mark>THANKS </mark> **<mark>FOR </mark>** <mark>YOUR TIME</mark>
