Hour 22. Creating Node.js Modules

What You’ll Learn in This Hour:

• Creating a package.json file for a Node.js module

• Testing and developing your module

• Adding an executable to your module

• Hooking up your project to Travis CI

• Publishing your module to the npm registry

Why Create Modules?

In Hour 2, “npm (Node Package Manager),” you learned about npm. This gives you access to a wide range of modules created by third-party developers all around the world. As you become more proficient in Node.js, or your projects become more complex, it is likely that, at some point, you will want to create modules of your own for these reasons:

• For convenience and to avoid writing the same code over and over again.

• To provide a specific piece of ...

Get Sams Teach Yourself Node.js in 24 Hours 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.