Ratelimiting with Vercel KV
This example showcases how you can add serverless ratelimiting using @upstash/ratelimit and Vercel KV.
Demo
ratelimit-with-vercel-kv.vercel.app
Getting Started
Prerequisites
All you need is a Vercel account and Vercel KV database
Quickstart
-
Clone the repo
git clone https://github.com/upstash/examples.git cd examples/examples
-
Install packages
pnpm install
-
Enter your secrets in
.env
KV_URL="" KV_REST_API_URL="" KV_REST_API_TOKEN="" KV_REST_API_READ_ONLY_TOKEN=""
-
Run the app
pnpm dev
-
Open http://localhost:3000 with your browser to see the result.
Learn More
To learn more about Upstash and its services, check out the following resources: