Tag: node

Node by example

Node by example: 8. HTTP module

8. HTTP module

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

Node provides a module specifically for the http protocol. Use it via require('http').

As taken from the official documentation at http://nodejs.org/api.html#http-145:
The HTTP interfaces in Node are designed ...

Node by example

Node by example: 7. net module

7. net module

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

With the release of node v0.1.91, the previously existing "tcp" module has been renamed to "net". It provides 2 main objects, net.Server, which is used to create a TCP or UNIX ...

Node by example

Node by example: 6. DNS Resolving

6. DNS Resolving

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

The DNS module provides DNS resolving related features, such as IPv4 & IPv6 resolving, specific record types resolving and reverse resolving. [1]
Please note: even though the documentation mentions the lookup capability of MX record ...

Node by example

Node by example: 5. Child Process & File System

5. Child Process & File System

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

Child Process: [1]
Please note:
at the time of this writing the api has changed and ChildProcess is now its own class, so please make sure you have the latest node version ...

Node by example

Node by example: 4. Basics

4. Basics

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

Encodings:
Node.JS supports UTF-8 ("utf8"), ASCII ("ascii") and Binary ("binary").
ASCII and Binary are relatively fast, UTF-8 is slower and should be avoided when possible.

Globals: [1]
i) Arguments:
See 04_Basics/global.js:

var ...

Previous Posts Next Posts