bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/Node.js/Database Integration
Node.js•Database Integration

Node.js MongoDB

Node.js can be used in database applications.

One of the most popular NoSQL database is MongoDB.

MongoDB

To be able to experiment with the code examples, you will need access to a MongoDB database.

You can download a free MongoDB database at [https://www.mongodb.com/ .

Or get started right away with a MongoDB cloud service at [https://www.mongodb.com/cloud/atlas .

Install MongoDB Driver

Let us try to access a MongoDB database with Node.js.

To download and install the official MongoDB driver, open the Command Terminal and execute the following:

Download and install mongodb package

C:\Users\
Your Name
>npm install mongodb

Now you have downloaded and installed a mongodb database driver.

Node.js can use this module to manipulate MongoDB databases:

let mongo = require('mongodb');

Previous

Node.js MySQL Join

Next

Node.js MongoDB Create Database

This chapter

Overview
24

Lessons

70m

Read time

1. Node.js MySQL2. Node.js MySQL Create Database3. Node.js MySQL Create Table4. Node.js MySQL Insert Into5. Node.js MySQL Select From6. Node.js MySQL Where7. Node.js MySQL Order By8. Node.js MySQL Delete9. Node.js MySQL Drop Table10. Node.js MySQL Update11. Node.js MySQL Limit12. Node.js MySQL Join13. Node.js MongoDB14. Node.js MongoDB Create Database15. Node.js MongoDB Create Collection16. Node.js MongoDB Insert17. Node.js MongoDB Find18. Node.js MongoDB Query19. Node.js MongoDB Sort20. Node.js MongoDB Delete21. Node.js MongoDB Drop22. Node.js MongoDB Update23. Node.js MongoDB Limit24. Node.js MongoDB Join

On this page

MongoDBInstall MongoDB Driver