# CMS API Config

### **Mongo DB**  <a href="#firebase" id="firebase"></a>

This App uses Mongo DB as a backed to read and save data for Menu, Order. In this section, you will find all the steps required for the dashboard connection with your App.

First, you should create a free Mongo DB account and create a new Cluster there. You can visit <https://www.mongodb.com/cloud/atlas> and signup if you don't have an account earlier, and if you have an account, you can log in by giving your credentials&#x20;

![](/files/-MQlbujg3dS-90x2mULb)

Once you log in it navigate to the page where you can select the free version as mentioned in the below screenshot

![](/files/-MQlbypm-7DKkt-nEkrk)

Next click on create cluster as mentioned in the screenshot&#x20;

![](/files/-MQlc3-fDhVc6WNbx8r8)

Select free version and then click on create cluster as mentioned in the below screenshot.

![](/files/-MQlc9G7dGlxuTVT8j4q)

Once the cluster gets created&#x20;

![](/files/-MQlcDT9J-B71GtxBjb3)

Once the cluster gets created click on Database on the left-hand side, it navigates to the window where you can create user mentions the name and create a password then click on Add user as mentioned in the screenshot below

![](/files/-MQlcO85BIeSR5TbC_wP)

Once you click on add user user gets created successfully&#x20;

![](/files/-MQlcZiPmM1J_zgUBoj2)

Then go to cluster and connect to the group and navigates to the window where you need to select connect your application as displayed in the below screenshot.

![](/files/-MQlceg0y38ns9Ehs4sQ)

Then it navigates to the window where you can copy the string  copy it .

![](/files/-MQlciiK9mvrv4T119EZ)

After copying navigate to your API project directory there on the left-hand side go to **server >components >Environments >development.js** there you can see uri replace the string whatever you copied earlier and enter the password as mentioned in the screenshot below .

![](/files/-MQlcqI1VxLGmBcW4XPw)

Then in the project directory, you can find package.json file to see this go to **server >api >config >package.json** .there make mongoose "5.7.0" as mentioned in the screenshot below and rerun it must run successfully.

![](/files/-MQlcuJpQ0uQdReP8eYs)

Then navigate to your mongo DB cluster there in the left-hand side you can find Network Access there click on edit >Add current IP address >we get the IP address as displayed in the screenshot below copy it

![](/files/-MQlcz4ov7v4Y0bNn3pg)

Once you copy it navigate to your dashboard project directory and replace this copied IP address in **src >app>environments >environment.prod.ts>environment.ts** > there you need to paste it in API endpoint because previously it was connected to Heroku server so if you want to connect to your server you need to paste copied IP address in API endpoint. as displayed in the below screenshot .

![](/files/-MQld2CuQuM_Uc2BDodM)

Then run the dashboard again and your application gets connected to your server .


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionicfirebaseapp.com/readymade-restaurant-app/api-config-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
