Node

Purely evented I/O for V8 javascript.

This is an example of a web server written with Node which responds with "Hello World" after waiting two seconds:

new node.http.Server(function (req, res) {
  setTimeout(function () {
    res.sendHeader(200, [["Content-Type", "text/plain"]]);
    res.sendBody("Hello World");
    res.finish();
  }, 2000);
}).listen(8000);
puts("Server running at http://127.0.0.1:8000/");

To run the server, put the code into a file server.js and execute it with the node program

% /usr/local/bin/node server.js
Server running at http://127.0.0.1:8000/

See the API documentation for more examples.

Node is released under an MIT license.

Download

TODO

Build

Node aims to support all POSIX operating systems (including Windows with mingw). However at the moment it is only being tested on Macintosh and Linux.

V8, on which Node is built, supports only IA-32 and ARM processors.

The build system requires Python.

./configure
make
make install