Step 13

Open index.js and add the following statements to the top of it:

const db = require("./data/db.js");

Next, add the following statement anywhere within the source file:

db.connect();

Save the file and run the API server!

Open your cluster on MongoDB Atlas. You must have a "notes" collection with 4 sample note documents:

Open Postman and try the API by retrieving all the notes:

Using Postman, try other API endpoints and make sure the updates are persisted in the database.