My contemplations and diurnal novelties are publicized here


I have Windows 7 Ultimate installed. Following are the steps how I achieved my first program up and running

  1. Download Node.js installer from here http://nodejs.org/#download
    1. Follow default setup steps to install this installer.
  2. Once installed you will find nodejs located some where here C:\Program Files\nodejs
  3. Save the code below inside in example.js and save it inside same location at C:\Program Files\nodejs\

    var http = require(‘http’);
    http.createServer(function (request, response) {
    response.writeHead(200, {‘Content-Type’: ‘text/plain’});
    response.end(‘Hello World\n’);
    }).listen(8124);

    console.log(‘Server running at http://127.0.0.1:8124/‘);

  4. Run command prompt Run -> cmd
  5. Point to the same location in command prompt C:\Program Files\nodejs\ and
    type node example.js

  1. You page is up and running

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: