To add Gzip compression with Node.js, we use the compression
package.
To install it, we run
npm install compression
Then we use it by writing
const express = require("express");
const compression = require("compression");
const app = express();
app.use(compression());
to call app.use
with the middleware returned by the compression
function to add gzip compression to our Express app.