Node.js

Links: Homepage | Downloads
Dependencies: None
Version: 0.10.17

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.

Get the Code

Switch to /usr/local/src and download the pre-compiled binaries.

cd /usr/local/src
curl --remote-name http://nodejs.org/dist/vVERSION/node-vVERSION-darwin-x64.tar.gz

Install

Unpack the binaries into /usr/local.

tar -zxvf node-vVERSION-darwin-x64.tar.gz -C ..

Create a symbolic link to /usr/local/node.

ln -s node-vVERSION-darwin-x64 /usr/local/node

Shell

Execute the following lines to update your Bash startup script.

echo 'export PATH=/usr/local/node/bin:$PATH' >> ~/.bash_profile
echo 'export MANPATH=/usr/local/node/share/man:$MANPATH' >> ~/.bash_profile

Load the new shell configurations.

source ~/.bash_profile

Verify the Installation

To verify that you have correctly installed Node.js, execute the following command. It should display vVERSION.

node --version