API Config

Mongo DB

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

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

‚Äč

Next click on create cluster as mentioned in the screenshot

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

Once the cluster gets created

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

Once you click on add user user gets created successfully

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.

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

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 .

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.

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

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 .

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