What Mongoose is all about

Mongoose is an object modeling tool for MongoDB and Node.js. What this means in practical terms is that you can define your data model in just one place, in your code.

Yes, that's right. You don't have to create a schema in the database, link that to an ORM or map it into your project objects and classes. You can just define your data structure in JSON inside your project.

The first time I created a project like this I was amazed at how much time and frustration it saves. Even now I still get that warm glow when I start a new project or prototype using Mongoose. It's like taking a shortcut to work down deserted country lanes while everybody else is gridlocked on the highway.

A schema definition can be as simple as the following ...

Get Mongoose for Application 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.