@canmertinyo/rate-limit-express
Version:
A simple rate-limiting middleware for Express.js with support for in-memory, Redis, and MongoDB storage
20 lines (14 loc) • 466 B
text/typescript
/**
* @property port - Redis server port, default : 6379
* @property host - Redis server host or IP address.
* @property username - Redis username for authentication (optional)
* @property password - Redis password for authentication (optional).
* @property db - Redis database number, default is 0 (optional).
*/
export interface RedisConfig {
port: number;
host: string;
username?: string;
password?: string;
db?: number;
}