The official MongoDB Node.js driver provides both callback-based and Promise-based interaction with MongoDB, allowing applications to take full advantage of the new features in ES6. The 2.x series of the driver is powered by a brand new core driver and BSON library.
- MongoDB Driver
- A brand new MongoDB driver for Node.js that keeps compatibility with the 1.4.x driver series, only breaking behavior where the 1.4.x branch had significant problems. The driver also includes support for the shared CRUD API specification and the Server Discovery and Monitoring Specification (SDAM).
- Core driver
- The MongoDB Node.js core driver is the new underpinning for the driver and is meant for framework developers that do not need the helpers and abstractions available in the full driver. This driver is not meant for end users, as it offers none of the conveniences of the higher level APIs .
Given that you have created your own project using `npm init` we install the mongodb driver and it's dependencies by executing the following `NPM` command.
npm install mongodb --save
This will download the MongoDB driver and add a dependency entry in your `package.json` file.
|3.1 Driver||Reference | API|
|3.0 Driver||Reference | API|
|2.2 Driver||Reference | API|
|3.1 Core Driver||Reference | API|
M101JS: MongoDB for Node.JS Developers
Learn everything you need to know to get started building a MongoDB-based app. From basic installation, JSON, schema design, querying, insertion of data, indexing and working with the Node.JS driver.