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 :


MongoDB Tutorial – Learn Basics of MongoDB with Examples.


In this Node.js Tutorial – Node.js MongoDB, we have learnt to interface MongoDB Database with Node.js Applications using examples.