how to rate limit in trpc express/nodejs server (not nextjs)

?
4 Replies
test_1
test_112mo ago
each prodecure will have different rate limit for IP or sometthing idk maybe whole database will have same limit for now if there is no simple solution
Keef
Keef12mo ago
I’ve done it using redis before
z
z12mo ago
npm
express-rate-limit
Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.. Latest version: 6.7.0, last published: 7 months ago. Start using express-rate-limit in your project by running npm i express-rate-limit. There are 733 other projects in the npm registry using express-rate-limit.
Keef
Keef12mo ago
Looks like itll work 😄