Basic rate limit implementation with redis and nextjs. Rate limiting the user by using their ip address.
- Set an expiration time and allow hits for the API.
- Using the redis increment method, increase and cache the IP address.
- Check to see if it is a first request.
- create ttl based on the request
- Using the redis expire method, expire the IP address.
git clone https://github.com/im-snowin/simple-api-rate-limit.git
and install the dependencies
npm i