[Node.js 101] 1. Getting started

[ What is Node.js? ]

[ ‘Hello World!’ in a Command Prompt ]

console.log("Hello World!")
node index.js

[ ‘Hello World!’ in a HTTP Server ]

var http = require("http");
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('\nHello World!\n');
}).listen(8081);
console.log('Server running at http://127.0.0.1:8081/');
node server.js