Skip to content
Open source eBook for nodejs - written w/ markdown outputs to various formats (pdf, mobi, epub, html, etc)
Pull request Compare This branch is 15 commits behind jimschubert:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Mastering Node

Mastering node is an open source eBook by node hackers for node hackers. TJ started this as a side project and realized that he didn't have time :) Jim picked up some editing and project structuring. It's open to everyone, so go nuts, download it, build it, fork it, extend it and share it. If you come up with something you wish to contribute back, send a pull request.



Mastering node is written using the markdown files provided in ./chapters, which can then be converted to several output formats, currently including pdf, mobi, epub and of course html.

All Formats

$ make


Required by make book.pdf:

$ brew install htmldoc
$ make book.pdf


Required by make book.html:

Node.js is required to convert markdown to html. The conversion process was borrowed from node.js and its generation of API documentation.

The scripts are located in tools/docbook with minor modifications from the node.js repository.

$ make book.html


Required by make book.epub: Requires Calibre

$ make book.epub


Required by make Requires Calibre, specifically ebook-convert version 3.

To install the most recent version of calibre:

sudo python -c "import urllib2; exec urllib2.urlopen('').read(); main()"

To make the format:

$ make


Contents of this eBook currently reference the following software versions:

  • node 0.4.0


All example source can be run simply by executing node against the file, for example:

  $ node src/events/basic.js

Hacking node

Executing node without parameters will enter a node console, a Read-Eval-Print-Loop (REPL). Here, you can inspect objects and execute commands.

> require
{ [Function: require]
  resolve: [Function],
   [ '/home/jim/.node_modules',
     '/usr/local/lib/node' ],
  main: undefined,
  extensions: { '.js': [Function], '.node': [Function] },
  registerExtension: [Function],
  cache: {} }
> console
{ log: [Function],
  info: [Function],
  warn: [Function],
  error: [Function],
  dir: [Function],
  time: [Function],
  timeEnd: [Function],
  trace: [Function],
  assert: [Function] }


Node.js is an official trademark of Joyent. This work is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.

Creative Commons License
Mastering Node by TJ Holowaychuk is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Something went wrong with that request. Please try again.