How can I load throttling in Node.js / Express 4?

I would like to disable file upload in Express 4. By this I mean bytes per second, not the number of API calls.

I want to simulate a slow connection to download files so that I can check the animation of the progress.

I want to limit the endpoint of the file upload, not the other endpoints. How can i do this?

Ideally, I would like to add some middleware to a specific endpoint and indicate the transfer rate in bytes / s.

+5
source share
2 answers

If you are on OSX and just interested in some random tests (as opposed to a standardized test), I would look at the Apple Network Link Conditioner. Here is info .

It also seems that in the latest versions of Chromium and I believe that Chrome has built-in throttling options in dev tools.

+1
source

It seems that the Chrome developer tools also allow you to configure a slower network.

0
source

All Articles