dlimits
Generic rate-limiter and Express rate-limiter middleware
How to use it
const default: Dlimits defaultStore = ; // Constructir allow 1 requests each 2 seconds const key = 'my-func'; const funcRateLimit = 1 2e3 defaultStore minWait: 1000 maxWait: 8000 ; const myFunc = async { try await funcRateLimit; console catche console; // Handle rate time limit } async { await ; // Will execute await ; // Will show an error await ; await ; // Will execute };
express middleware
; app;