Category: MongoDB

Linux Cloud Server Hosting :: How To Connect Node.js to a MongoDB Database

4

Introduction

In this tutorial, we will show how to use Node.js to connect to a MongoDB database in a server and do some basic data manipulations.

Here are the following software components that will be used:

  • Ubuntu 12.04 x32
  • MongoDB v2.4.6
  • Node.js v0.10.20
  • The MongoDB Node.js driver

MongoDB

“MongoDB is an open source document-oriented database that provides high performance, high availability, and easy scalability”

If you are not familiar with MongoDB or don’t have it installed, please check out this tutorial first.

Let’s verify that the MongoDB process is running:

ps -ef | grep mongo

Read more »