Feb 9, 2014

How to install Node.js?


In this post we will learn what is Node.js and as it installs successfully ,step by step, on different operating systems.



What is Node.js?

Until not long ago, JavaScript only was used to develop front-end, which is the part closest to the user, but with the arrival of Node.js this has changed.

Node is a Back-end JavaScript interpreter that changes the concept of how a server should work. Its objective is to enable developers to create highly scalable applications and write code to handle tens of thousands of concurrent connections on a single physical computer.




"Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices." - nodejs.org -





How install Node.js?

Note: Python 2.6 or 2.7 is required to build from source tarballs.


Windows

If you're using Windows, the easiest way to install node is download the installer ".msi" from the official website nodejs.org/download/

Node.js Windows Installer


When the download is finished, you just have to double-click and follow the instructions. After already it's installed.


MAC (OSX)

If your operating system is OS X you can install Node in two different ways: 


A - Machintos installer

It is the same process as in Windows. Download the installer form the official website nodejs.org/download/



When the download is finished, you just have to double-click and follow the instructions. After already it's installed.


B - Homebrew

Write in the terminal:

$ brew install -g nodejs

That's all.


LINUX

If your operating system is Linux you need write in your terminal this:

$ sudo apt-get update
$ sudo apt-get install git-core curl build-essential
$ sudo apt-get install openssl libssl-dev
$ git clone https://github.com/joyent/node.git && cd node
$ ./configure
$ make
$ sudo make install
$ echo 'export NODE_PATH=/path_to/node' >> ~/.bashrc
$ echo 'export PATH=$PATH:/path_to/node' >> ~/.bashrc
$ source ~/.bashrc




How confirm that is ok?

Write in you terminal:

$ node -v

if the answer is similar to "v0.10.25", the installation was completed perfectly. The number can be different because is the version of you have installed.


Next Post Recomended - First HelloWorld in Node.js

1 comment:

  1. What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. nodejs software developers

    ReplyDelete