O'Reilly logo

Sams Teach Yourself Node.js in 24 Hours by George Ornbo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 2. npm (Node Package Manager)

What You’ll Learn in This Hour:

• Installing modules for Node.js with npm

• Finding modules for your Node.js applications

• Using modules in your Node.js applications

• Finding documentation on Node.js modules

• Using a package.json file

What Is npm?

npm (Node Package Manager) is a package manager for Node.js. It allows developers to create, share, and reuse modules in Node.js applications. It can also be used to share complete Node.js applications. Modules are simply libraries of code that can be reused in different projects. If you have programmed in other languages, npm is similar to RubyGems in Ruby, CPAN in Perl, pip in Python, or PEAR in PHP.

Typical examples of modules include

• A library for interacting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required