20131229 On Windows

Thanks to


Download from and install

- Ensure add to path is left selected

Run cmd and at prompt >node to tests whether enters command line

Yay, CTRL-C twice to exit


Create a folder to hold your node assets, ie d:\_Node\

In CMD move to this folder first before entering the Node command line


- to run a JS file from the current CMD folder:

  - node myjsfile.js


Create file helloworld.js

// our very first node program
console.log("Hello world!");

run it at cmd line when in d:\_node\

- node helloworld.js


A simple webserver

create a new simpleserver.js file

// include http module var http = require('http'); // create server http.createServer(function (req, res) { // respond to any incoming http requests res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('I am alive!\n'); }).listen(1337, ''); // log server started at localhost:1337 console.log('Server running at');

run it:

- node simpleserver.js

access it at http://localhost:1337/

Stop it using CTRL-C



At node command line in target folder ie d:\_node:

- npm install xml2js