Tagged: cheap node.js hosting

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 »

How To Install And Run A Node.js App On Centos 6.4 64bit

Node.js installation

Now that we’re ready to install Node.js from sources. First, we’ll move to /usr/src directory – the usual place to hold software sources.

cd /usr/src

Now, we pick the latest compressed source archive from Node.js website at http://nodejs.org/download/.

wget http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz

We could and should replace the url and use the more recent version of node.js, if there is one. Next, we are uncompressing the source files and move into that directory.

Read more »