Using npm

The node package manager npm comes with the Node.js installer. npm is used for the command line; to use it, we will need to run a terminal program (a command prompt).

On Windows, we can use the basic cmd.exe, or alternatively, we can download and install Console from http://sourceforge.net/projects/console/.

On Mac OS X, Terminal.app can be used to run commands.

On Linux, use your favorite terminal. The default on Ubuntu Linux is the gnome terminal.

Open the terminal and type: npm. This command runs npm without any parameters. As a result, npm will print a general usage overview listing the available subcommands.

Installing a local package

Let's create an empty directory for our project named test, navigate to that directory, and install the ...

Get HTML5 Data and Services Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.