I want to implement some sort of API rate-limiting and blocks on my remix of this project like preventing someone from adding a blank URL to the server like this…
## Think the URL is undefined.
…and instead, greet them with a JSON error and block them temporarily for a whole day like this…
"description": "You sent us a blank URL and the server blocked your requests temporarily for a whole day.",
"reason": "Sent a blank URL to the API.",
"expires_on": "24 hours"
But the question is what Node.js packages should I use for implementing rate-limits and automated/manual bans and how to implement them?
I think there is a package…a simple search should work.
If you are using express you can use express-rate-limit
If I use
MemoryStore, does its rate-limited IP addresses on memory will clear on triggering
refresh or stopping a project on API?
So, I want to go to file-based DB instead to guessing how can I connect to a Redis database on my code. How?
I don’t have any experience with Redis specifically, but this project looks like it might be able to walk you through it.
@FlantasticDan I am having issues when using Node.js with Redis. When I start on Glitch, only the Redis server is up, not the Express one. Any solution?