Code snippets from book "Node up and running".