The MongoDB Node.js driver is the officially supported native method for accessing MongoDB from Node.js applications. It is simple to install and easy to incorporate into your Node.js applications. In this chapter you learned the various methods and options to connect to a MongoDB database using the MongoClient
class. You also got a chance to see and work with the Db
, Admin
, Collection
, and Cursor
classes.
The examples in this chapter took you through creating, viewing, and deleting databases dynamically from your Node.js applications. You also got a chance see how to create, access, and delete collections.