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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.