HTML and CSS Reference
What's in this chapter?
• Understanding Node.js
• Installing and using Node modules
• Writing your own Node command-line module
Wrox.com Code Downloads for this Chapter
title.cgi?isbn=9781118301326 on the Download Code tab. The code is in the chapter 08 download and individu-
ally named according to the names throughout the chapter.
seemed to gain much traction. This started to change in 2010 following a November 2009 JSConf presentation
line to support your game.
Learning About Node.js
Node ) is by far the most popular and has the best cross-platform support (Windows, OS X, and Linux). Because
One of the core ideas of Node is that all I/O should be nonblocking. This means any time the server waits
on some data or some input, it shouldn't prevent the execution of other code. The way that Node handles this is
through the use of callbacks , which are executed automatically when the resource that was blocking becomes
familiar with because it's the way that most user interfaces (including web pages) are programmed: You add an
event listener with a callback that gets called when that event is triggered.