Node.js is a great server-side platform with extensive support and use around the world, but sometimes it can be a little difficult to find helpful packages specific to your project.
In this article, we highlight 10 packages that come in handy every time you develop Node.js apps!
Express is worth picking up because it makes building HTTP services easier and faster. It also implements a number of user setup options to make your app better - middleware, templating engines, and logging utilities.
It provides all the tools and utilities needed to create great applications. If you're new with node, express will help you get started quickly with optimized experiences.
How to install express using npm:
$ npm install express --save
Website and Documentation: https://expressjs.com/
Although originally designed for use with Node.js and installable via npm, it can also be used directly in the browser.
The ES Modules version is included in the main async package that should automatically be used with compatible bundlers such as Webpack and Rollup.
How to install async:
$ npm install async --save
Cheerio parses markup and provides an API for traversing/manipulating the resulting data structure. Cheerio does not interpret the result as a web browser does.
$ npm install cheerio --save
Nodemailer is a lightweight node.js library to send emails. It consumes your SMTP settings on Node.js and clients, enables attachments, and requests non-standard routes for sending emails with headers, body, and pattern matching.
It offers a simple and powerful API to write SMTP Server, outgoing mailboxes, DNS records, the page to enter custom domains, and a variety of other features.
The documentation which is hosted on reading the Docs gives a complete overview of everything made available by this module.
How to install Nodemailer:
$ npm install nodemailer --save
Bcrypt is a strong password hashing algorithm. It uses a high-cost, memory-hard hash function (under the hood it is using Blowfish) and keeps the state in RAM allowing for low CPU usage. The algorithm works on an 8-byte salt and stores 12 unique hashes of that salt in 8 bytes each.
How to install bcrypt:
$ npm install bcrypt --save
How to install image-size:
$ npm install image-size --save
compression package compresses your data without any loss in quality and shrinks the size down to a so-called gzipped format (.gz). The data is able to be unzipped with another tool such as gzip itself, or gunzip.
How to install compression:
$ npm install compression --save