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.,

 

  1. Login to MongoDb.
  2. Click Connect given in the cluster.
  3. Select Connect your application.

https://json.commudle.com/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBcGdTIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3eee814e030d44e7d9e1442f0831ddf01be929f1/Screenshot%20(387).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.

Discussion
Amazing! It literally would take just 15 minutes :)

2

Thank you Arpan.

1

20

1