express-rate-limit / rate-limit-redis

A rate limiting store for express-rate-limit with Redis/Redict/Valkey/etc.
https://www.npmjs.com/package/rate-limit-redis
MIT License
184 stars 34 forks source link

What is args ? #202

Open ilhamsj opened 8 months ago

ilhamsj commented 8 months ago

Description

Some people may not understand this part. sendCommand: (...args: string[]) => client.sendCommand(args),

Why

some people may not understand args part.

Alternatives

please add more detail description can use rate-limit-mongo for reference

nfriedly commented 8 months ago

Yeah, that's a fair point. args is an array containing the command and any values that rate-limit-redis passes to the database driver.

I'd like to put out an updated version of this library that has a default redis driver built-in, so that the whole sendCommand thing is unnecessary for basic usage, which should reduce that confusion.

moohbr commented 8 months ago

@nfriedly did want some help to do it? I have some free time until my colleague starts.

nfriedly commented 8 months ago

Sure! I just filed #203 with my thinking. I'd be interested in hearing if @wyattjoh or @gamemaker1 had any thoughts on the idea also.