All posts from April 2010
Node by exampleNode by example: 13. Links & Where to go from here
Published on April 29, 2010
0 Comments
13. Links & Where to go from here
The complete source code can be downloaded here: http://github.com/Hendrik/node-by-example
Please note: Node.JS is still in active development, so that some articles may contain code that is no longer working with newer versions of Node.JS
During the time ...
Node by example: 12. Sample Project
Published on April 29, 2010
0 Comments
12. Sample Project
The complete source code can be downloaded here: http://github.com/Hendrik/node-by-example
The following is a sample project which displays your website visitors in real time on google maps using node with the geoip and websocket server modules.
Basically what the script does is to watch ...
Node by exampleNode by example: 11. REPL
Published on April 29, 2010
0 Comments
11. REPL
The complete source code can be downloaded here: http://github.com/Hendrik/node-by-example
A Read-Eval-Print-Loop is available both as a standalone program and easily includable in other programs. REPL provides a way to interactively run JavaScript and see the results. It can be used for debugging, testing, or ...
Node by exampleNode by example: 10. addon modules
Published on April 29, 2010
0 Comments
10. addon modules
The complete source code can be downloaded here: http://github.com/Hendrik/node-by-example
The examples in this chapter are meant to showcase extending node with some of the available third party modules.
Websockets (server & client), MySQL access and GeoIP are covered in this chapter.
i) GeoIP:
The ...
Node by example: 9. multipart module
Published on April 29, 2010
4 Comments
9. multipart module
The complete source code can be downloaded here: http://github.com/Hendrik/node-by-example
Please note: the multipart module was originally part of node, but has been removed in a previous release.
It is supposed to come back in an improved form, so that I will keep this ...
Node by example: 8. HTTP module
Published on April 29, 2010
0 Comments
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: 7. net module
Published on April 29, 2010
0 Comments
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 exampleNode by example: 6. DNS Resolving
Published on April 21, 2010
1 Comments
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: 5. Child Process & File System
Published on April 21, 2010
0 Comments
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: 4. Basics
Published on April 21, 2010
0 Comments
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 ...
