Skip to content

Home > @opengovsg/rate-limit > createRateLimiter

createRateLimiter() function ​

Create a rate limiter backed by the injected Redis client, or by in-memory counters when no client is configured.

Signature:

typescript
createRateLimiter: (options: CreateRateLimiterOptions) => RateLimiter

Parameters ​

ParameterTypeDescription
optionsCreateRateLimiterOptions

Returns:

RateLimiter