Connecting to MongoDB and writing data

To connect to our MongoDB database from inside of Node.js, we're going to be using an npm module created by the MongoDB team. It's called node-mongodb-native, but it includes all of the features you'll need to connect to and interact with your database. To get to it, we're going to Google node-mongodb-native:

The GitHub repo, which should be the first link, is the one we wantthe node-mongodb-native repositoryand if we scroll down, we can take a look at a few important links:

First up we have documentation ...

Get Advanced Node.js 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.