Running the Todos script

We're going to run the script from the Terminal. I'm going to kick things off by running node. The file we're running is in the server directory, and it's called server.js:

node server/server.js

When we run the file, we get Saved todo, meaning that things went well. We have an object right here with an _id property as expected; the text property, which we specified; and the __v property. The __v property means version, and it comes from Mongoose. We'll talk about it later, but essentially it keeps track of the various model changes over time.

If we open up Robomongo, we're going to see the exact same data. I'm going ...

Get Advanced 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.