MongoDB Node.js Driver

The next generation Node.js driver for MongoDB

Latest documentation

Introduction

The official MongoDB Node.js driver allows Node.js applications to connect to MongoDB and work with data. The driver features an asynchronous API which allows you to interact with MongoDB using Promises or via traditional callbacks.

Features

MongoDB Driver
Whether you are new to MongoDB or you just want to brush up on the core concepts, you can check out the Fundamentals section which features material on using the Node.js driver for the following:
  • Connection Guide: connect to a MongoDB instance or replica set
  • Authentication: configure authentication and log a user in
  • CRUD Operations: read and write data to MongoDB
  • Promises and Callbacks: access return values using asynchronous Javascript
  • Indexes: create and design indexes to make your queries efficient
  • Collations: apply language-specific sorting rules to your query results
  • Logging: configure the driver to log MongoDB operations
  • Monitoring: configure the driver to monitor MongoDB server events

Quick Start

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.

Releases

ReleaseDocumentation
Next Driver Reference | API
5.6 Driver Reference | API
5.5 Driver Reference | API
5.4 Driver Reference | API
5.3 Driver Reference | API
5.2 Driver Reference | API
5.1 Driver Reference | API
5.0 Driver Reference | API
4.16 Driver Reference | API
4.15 Driver Reference | API
4.14 Driver Reference | API
4.13 Driver Reference | API
4.12 Driver Reference | API
4.11 Driver Reference | API
4.10 Driver Reference | API
4.9 Driver Reference | API
4.8 Driver Reference | API
4.7 Driver Reference | API
4.6 Driver Reference | API
4.5 Driver Reference | API
4.4 Driver Reference | API
4.3 Driver Reference | API
4.2 Driver Reference | API
4.1 Driver Reference | API
4.0 Driver Reference | API
3.7 Driver Reference | API
3.6 Driver Reference | API

Legacy Versions

ReleaseDocumentation
3.5 Driver Reference | API
3.4 Driver Reference | API
3.3 Driver Reference | API
3.2 Driver Reference | API
3.1 Driver Reference | API
3.0 Driver Reference | API
2.2 Driver Reference | API

MongoDB University

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.

Learn More