Express middleware for IP-based rate limiting with flexible configuration options and multiple storage backends
Overall
score
96%
Build a small HTTP service that rate-limits requests using the dependency's built-in in-memory store and exposes a cleanup hook.
/api/message so a client receives successful responses (status 200, JSON body with a message string) while under the configured limit for the window. @test/admin/reset accepts a JSON body with clientId; when provided, clear that client's counters immediately using the limiter's own reset mechanism and respond with 204. Missing clientId yields status 400. @test@generates
export interface RateLimiterOptions {
windowMs?: number;
limit?: number;
}
export function createApp(options?: RateLimiterOptions): import('express').Express;
export function shutdown(app: import('express').Express): Promise<void>;HTTP routing and middleware for the server. @satisfied-by
Provides request limiting with the built-in in-memory store. @satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-express-rate-limitevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10