Connecting the database
This section deals with connecting our REST API to its database. This requires a MongoDB cluster. Checkout this link if you dont know how to create one. After creating a cluster do the following steps.,
- Login to MongoDb.
- Click Connect given in the cluster.
- Select Connect your application.
.png)
4. Copy the URL given.
5. Go to app.js/line 3 and replace the MongoURL with the copied URL.
6. Replace the <password> with the cluster password.
7. Replace myFirstDatabase with your database name [any].
After creating, go to your text editor and open the template.
20
