> For the complete documentation index, see [llms.txt](https://softstack-factory.gitbook.io/mean-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://softstack-factory.gitbook.io/mean-stack/backend/wk6/backend-setup.md).

# Create a MongoDB

Use loopback backend framework and connect to a cloud based non relation database.

### **Step 1: Create a Database on** [**MongoAtlas**](https://mlab.com/signup/)

1. **Create account**

![](https://lh3.googleusercontent.com/A-rFc6qlVz4_LMVGAaae-qfrDGt2Zb2z8Nq8ePbNbOy1qirot9EavQ8dNfNKkqjuvjWtHCapyz2EpzI2HM6Z_Ce6Y81cs7xs__thpWofxhNd-kmyvkHQxWvrvs4QjmyhzHuPare-)

### **Step 2:** create new deployment for this project.

1. **Create new cluster**
   1. Choose **Amazon**
   2. Choose region: **North America:  Oregon(us-west-2)(U**
      * &#x20;**Note:** choose a free tier
   3. Name your database
2. **Submit order**

![](https://3729111192-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJF8uz6T7DhCLClK6jV%2F-Lvh0jqyT6hlYZLggD_r%2F-LvhAfIH6lJebW_-NCib%2Fimage.png?alt=media\&token=18b06046-c067-47a2-8ae3-5b4839238740)

**Once the cluster is created, the following dashboard  should appear:**

![](https://3729111192-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJF8uz6T7DhCLClK6jV%2F-LrLTLFkYwfTauidqgLb%2F-LrLV_EHFflTJZQTTZlN%2Fimage.png?alt=media\&token=85ae2769-103c-4469-8fcb-30384588068a)

### **Step 3: Create Database User**

**Under the Security tab:**&#x20;

1. Click **Database Access**
2. Click on the **add new user button**
3. Insert **name and password**. Remember the username, as it will be used in the next steps.
4. **Choose read and write**&#x20;
5. **Click add user button**

![](https://3729111192-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJF8uz6T7DhCLClK6jV%2F-LrLYEWDNkVtBk1yINjE%2F-LrLYJJ-PCHNsdH2cV_w%2Fcreate-database-user.gif?alt=media\&token=bc82038d-f37b-48bf-94b8-8ef232a0d4d5)

In this step you created a user to manage your database. You will need this info to connect the server to the database and manage it.

{% hint style="info" %}
**Note:** This is different than your MongoAtlas user account
{% endhint %}

### **Step 4: Add an IP**

**Under the security tab:**

1. Click **Network Access**
2. Click **on the add IP address button**
3. Choose **allow access from anywhere**
4. Lastly, **confirm the changes**

![](https://3729111192-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LJF8uz6T7DhCLClK6jV%2F-LrLYEWDNkVtBk1yINjE%2F-LrM1OfJA4JcR6azKCVC%2Fnetwork-access.gif?alt=media\&token=829e60f9-3209-423d-9188-eae434d00d87)

###

### **Step 5: Create database and collection**

1. Click on the **collections button** on your cluster dashboard
2. Click on the **add my own data button**
3. **Insert database name**. Remember this name as it will be used in the next step steps. (final-project)
4. Insert a **collection name**
5. Click **Create**

![](https://lh3.googleusercontent.com/nJhOzkYuKnOPx0jrtaiKMFNtNS1er07B-0mzRPIYAtTvGRVPfpa2Lgy6SVDvh3MxE8iR1YS5IQSfpL3Oao8Te05IJWNJqB730eG9YamqhC_HHWX2OW5axkPJvMXXyyvFkiFUJSUR)

###
