http://hop.ie/go/node
Source files:
http://hop.ie/downloads/node-examples.zip
Doctor's surgery VS Fast-food outlet
L1 | 3 cycles |
---|---|
L2 | 14 cycles |
RAM | 250 cycles |
Disk | 41,000,000 |
Network | 240,000,000 |
Source: Ryan Dahl 2008 / Jeff Kunkle 2012
Currently: ~30k modules available
var fs = require('fs');
var contents = fs.readFile(
'./hello.txt',
'utf8',
function(err,contents){
console.log(contents);
}
);
console.log("Hello from Node!\n");
Download: http://hop.ie/downloads/node-examples.zip
var http = require('http');
var server = http.createServer(
function (request, response) {
response.writeHead(
200,
{'Content-Type': 'text/plain'}
);
response.end('Hello World!\n');
});
server.listen(1337, '127.0.0.1');
Using Express.js
hop.ie/tweets
Source code: github.com/donovanh/tweets
The good
The bad
Get in touch
http://hop.ie/go/node