Getting ready

In this recipe, we will see how to configure and use the compression NPM module to compress the request body sent to the client. Before you start, create a new package.json file with the following content:

{ 
    "dependencies": { 
        "compression": "1.7.2", 
        "express": "4.16.3" 
    } 
} 

Then, install the dependencies by opening a terminal and running:

    npm install
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.137.169