After searching (source), I have found, that it’s easier to install Node.js directly (so, no need of XAMP/WAMP):
-
Install http://nodejs.org/download/
-
Create a test file (example) C:\myFolder\test.js and put this code in that file:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:1337/');
-
Open CMD (COMMAND PROMPT) and execute:
node C:\myFolder\test.js
-
Open this address in your browser:
http://127.0.0.1:1337/