{"repo":"express-rate-limit/express-slow-down","free":true,"listed":false,"github":"https://github.com/express-rate-limit/express-slow-down","clone":"git clone https://github.com/express-rate-limit/express-slow-down.git","description":"Slow down repeated requests; use as an alternative (or addition) to express-rate-limit","language":"TypeScript","stars":302,"topics":["express","nodejs","rate-limiter","rate-limiting","express-middleware","expressjs"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Express Slow Down Basic rate-limiting middleware for Express that slows down responses rather than blocking them outright. Use to slow repeated requests to public APIs and/or endpoints such as password reset. Plays nice with (and built on top of) Express Rate Limit Stores The default memory store does not share state with any other processes or servers. It's sufficient for basic abuse prevention, but an external store will provide more consistency. express-slow-down uses express-rate-limit's stores Note : when using express-slow-down and express-rate-limit with an external store, you'll need to create two instances of the store and provide different prefixes so that they don't double-count requests. Installation From the npm registry: From Github Releases: Replace {version} with the version of the package that you want to your, e.g.: 2.0.0 . Usage Importing This library is provided in ESM as well as CJS forms, and works with both Javascript and Typescript projects. This package requires you to use Node 16 or above. Import it in a CommonJS project ( type: commonjs or no type field in package.json ) as follows: Import it in a ESM project ( type: module in package.json ) as follows: Examples To use it in an API-only server where the speed-limiter should be applied to all requests: To use it in a 'regular' web server (e.g. anything that uses express.static() ), where the rate-limiter should only apply to certain requests: To use a custom store: Note: most stores will require addi","default_branch":null,"files":null,"tree":[],"storefront":"/r/express-rate-limit","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/express-rate-limit/express-slow-down/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}