Home > Development > Installing Node.JS

Installing Node.JS

I wanted to look into Node.JS to see what its all about. My first install was on CentOS 5.

  1. Download the source from: http://nodejs.org/#download
  2. tar -xzf node-v0.4.8.tar.gz
  3. cd node-v0.4.8
  4. ./configure
  5. make
  6. make install

Installation was a snap. Here is the HTTP server test program node.js supplies in the docs that I slightly modified.

var http = require('http');
var server_ip = '';
var server_port = '1337';
http.createServer(function (req, res) {
        var request_params = require('url').parse(req.url);
        var str = 'You passed the query: ' + request_params.query;
        res.writeHead(200, {'Content-Type': 'text/plain'});
        res.write( str );
}).listen(server_port, server_ip);
console.log('Server running at http://'+server_ip+':'+server_port+'/');

Leave a Reply


Listed below are links to weblogs that reference
Installing Node.JS from rhythmicalmedia.com