Testing the functionality

The next step in the process will be to test this out by creating a new note. We already have two notes, with a title of secret and a title of secret2 in notes-data.json, let's make a third one using the node app.js command in Terminal. We'll use the add command and pass in a title of to buy and a body of food, as shown here:

node app.js add --title="to buy" --body="food"

This should create a new note, and if I run the command, you can see we don't have any obvious errors:

Inside of our notes-data.json file, if I scroll to the right, we have our brand new note as a title of to buy and a body of food:

So, everything ...

Get Learning Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.