Node.js MongoDB
Node.js MongoDB – In this tutorial, we shall learn to integrate MongoDB to Node.js Applications.
Prerequisites to work with MongoDB from Node.js
1. Make Sure MongoDB is installed. If not Install MongoDB.
2. Install “mongodb” package using npm (if not installed already).
arjun@nodejs:~/workspace/nodejs/mongodb$ npm install mongodb
npm WARN saveError ENOENT: no such file or directory, open '/home/arjun/workspace/nodejs/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/arjun/workspace/nodejs/package.json'
npm WARN nodejs No description
npm WARN nodejs No repository field.
npm WARN nodejs No README data
npm WARN nodejs No license field.
+ mongodb@2.2.33
added 9 packages in 9.416s
Node.js MongoDB Tutorial Index
As we learnt to make a connection to MongoDB, in our subsequent tutorials, we shall learn following concepts :
- Node.js Connect to MongoDB
- Node.js Create Database in MongoDB
- Node.js Delete Database from MongoDB
- Node.js Create Collection in MongoDB Database
- Node.js Delete Collection from MongoDB Database
- Node.js Insert Document(s) to MongoDB Collection
- Node.js Query Document(s) in MongoDB Collection
- Node.js Update Document(s) of a MongoDB Collection
- Node.js Delete Document(s) from a MongoDB Collection
References
MongoDB Tutorial – Learn Basics of MongoDB with Examples.
Conclusion
In this Node.js Tutorial – Node.js MongoDB, we have learnt to interface MongoDB Database with Node.js Applications using examples.