Getting to know Mongoose


Mongoose is a Node.js library that provides MongoDB object mapping similar to ORM with a familiar interface within Node.js. If you aren’t familiar with Object Relational Mapping (ORM) or, Object Data Mapping (ODM) in the case of Mongoose, this means is that Mongoose translates data in the database to JavaScript objects for use in your application. Let’s take a look at creating and storing documents in a collection using MongoDB and Mongoose.

Khái niệm cơ bản:

Schema and model