All posts from March 2010

Node by example

Node by example: 3. Modules

3. Modules

The complete source code can be downloaded here: http://github.com/Hendrik/node-by-example

As mentioned in the previous chapter, you use

var some_var = require("built-in_module_name");

to include one of Node.JS's built-in modules.

What if you want to include your own module?
Node.JS uses the CommonJS ...

Node by example

Node by example: 2. Hello World

2. Hello World

The complete source code can be downloaded here: http://github.com/Hendrik/node-by-example

It's the same old same old, but here goes:
The Node.JS "Hello World" example is a http server that serves a "Hello World" output 2 seconds after a client connects to the ...

Node by example

Node by example: 1. Introduction & Installation

i. Introduction

node-by-example is a collection of short code samples, that showcase some of the available features using Node.JS
The code samples are based on the Node.JS documentation, its unit test code, code posted online and made up by myself.

You can download the code here: http://github ...