MongoDB Node Driver¶
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 access method return values through Promises or specify callbacks to access them when communicating with MongoDB.
These docs are for version 3.6 of the MongoDB Node.js driver. If you are looking for an older version of the MongoDB Node.js driver docs, see the legacy Node.js driver documentation. For the main MongoDB documentation, see the MongoDB Manual.
Take the free online course taught by MongoDB¶
![]() |
|
Quick Start¶
To get up and running quickly, take a look at the Quick Start to learn how to establish a connection to MongoDB Atlas and begin to work with data.
Fundamentals¶
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
Usage Examples¶
The Usage Examples section provides runnable code snippets and explanations for common methods. We recommend this section for users that are new to the MongoDB Node.js driver.
API¶
See the API documentation if you are looking for technical information about classes, methods, and configuration objects within the MongoDB Node.js driver.
FAQ¶
The Frequently Asked Questions (FAQ) section provides answers to commonly asked questions about the MongoDB Node.js Driver.
Issues & Help¶
The Issues & Help section explains how to report bugs, contribute to the driver, and find additional resources for asking questions and receiving help.
Compatibility¶
The Compatibility section shows compatibility charts with the Node.js language and the MongoDB server versions.