Code from the Pragmatic Pub book: Node.js the Right Way.