Zipping Files

Learn how to zip files together with Node.

Installing dependencies

Up until now, you have been making use of Node’s standard API library, such as the process, path, and os modules. If you want to extend your choice to use more libraries that provide further functionality, you can turn to npm. The npm ecosystem is huge and if you search for a library with certain functionality, chances are that you will find it.

Suppose a member of your team has requested that you zip up a text file and an image. To accomplish this, you will use an external dependency identified as: archiver.

Get hands-on with 1400+ tech skills courses.