3

I have downloaded node.js tarball from its website, and now I would like install the manpage that comes with it so that I can view it by typing:

 man nodejs

How can I do this?

Flimm
  • 41,766
Patryk
  • 9,146

2 Answers2

4

It's not man nodejs, but man 1 node. And it will be there by default.

It will be installed for you with the regular installation method (e.g. sudo make install) as the tools/install.py called from the Makefile will take care of it:

if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
  action(['doc/node.1'], 'man/man1/')
else:
  action(['doc/node.1'], 'share/man/man1/')

In other words, it installs node.1 for you in /usr/share/man/man1/.


To read the manpage directly from the source, you can do:

man /path/to/nodejssource/doc/node.1
gertvdijk
  • 67,947
2

In addition to the man page, Node sets up its own help server.

npm help <term>

or to get started:

npm help npm

The documentation is also online at: Node.js API docs

chaskes
  • 15,246
  • thanks. I just saw your first comment and edited my answer. – chaskes Jan 18 '13 at 21:20
  • The node.1 is the exact file I want to link to man so that it will see it when I type man node – Patryk Jan 18 '13 at 21:21
  • okay :) yeah, other documentation methods like npm help provide a lot more, but the node command also features a manpage, just for the convenience. – gertvdijk Jan 18 '13 at 21:21