Importing External Modules with npm

npm is your gateway to a large and growing pool of open source Node modules. They do everything from stream parsing to connection pooling to session management. You’ll rarely write a Node application that doesn’t use at least one module from npm. We’ll use many external modules in this book, and zmq (the Node binding for ØMQ) is the first.

Modules managed by npm can be pure JavaScript or a combination of JavaScript and native addon code.[14] Addons are dynamically linked shared objects—they provide the glue for working with native libraries written in C or C++.

The vast majority of modules can be installed through the npm command-line tool alone, even if they contain addons. But a few, like the zmq ...

Get Node.js the Right Way 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.