April 2015
Intermediate to advanced
112 pages
2h 38m
English
If you go to the actual NodeJS.org home page and not just the download page, you might not need to scroll to find a code sample that looks pretty much like this:
var http = require('http');http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n');}).listen(1234, '127.0.0.1');console.log('Server running at http://127.0.0.1:1234/');
This sample is followed by a section that says the following:
"To run the server, put the code into a file example.js and execute it with the node programfrom the command line:"% node example.js
That produces output in the console that says this:
Read now
Unlock full access