https://github.com/exortek/api-rate-throttle-playground
Modern API rate limiting & throttling examples with Express and Fastify frameworks 🚀
https://github.com/exortek/api-rate-throttle-playground
Last synced: 2 months ago
JSON representation
Modern API rate limiting & throttling examples with Express and Fastify frameworks 🚀
- Host: GitHub
- URL: https://github.com/exortek/api-rate-throttle-playground
- Owner: ExorTek
- Created: 2024-11-06T08:31:04.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-07T21:24:22.000Z (over 1 year ago)
- Last Synced: 2026-03-01T11:00:31.682Z (4 months ago)
- Language: JavaScript
- Size: 72.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Rate Limiting And Throttling
API Rate Limiting and Throttling is a process that controls the rate of requests sent or received by an API. It is used to prevent abuse and ensure that the API is used in a fair and efficient manner. Rate limiting and throttling can help protect the API from being overwhelmed by too many requests, and can also help ensure that the API is used in a way that is consistent with its intended purpose.
## Clone the repository
```bash
git clone https://github.com/ExorTek/api-rate-throttle-playground.git
```
## Install dependencies
```bash
npm install
# OR
yarn install
```
## Run express server
```bash
npm run dev:express
# OR
yarn dev:express
```
## Run fastify server
```bash
npm run dev:fastify
# OR
yarn dev:fastify
```
## Required Configurations
- Check the `express-rate-limiting-redis` and `fastify-rate-limiting-redis` directories for the required configurations.
- Add your Redis configurations: `host`, `port`, `password`.