Skip to content
Avatar of upstashupstash/examples

Ratelimit with Upstash Redis

Ratelimit your applications with Upstash’s Redis and Ratelimit

Framework
Use Case
Database
rate-limit-upstash

@upstash/ratelimit & @upstash/redis example

This example demonstrates using @upstash/ratelimit with Upstash Redis.

Local Development

Copy the example env file:

cp .env.local.example .env.local

Set the environment variables in the new env file after creating an Upstash Redis instance.

Then, install the dependencies:

npm install

Finally, run the application with

npm run dev

Deploy to Vercel

To deploy to vercel, simply run

vercel

If you create a new project, you may need to set the environment variables and redeploy the app.

rate-limit-upstash
Avatar of upstashupstash/examples

Ratelimit with Upstash Redis

Ratelimit your applications with Upstash’s Redis and Ratelimit

Framework
Use Case
Database

@upstash/ratelimit & @upstash/redis example

This example demonstrates using @upstash/ratelimit with Upstash Redis.

Local Development

Copy the example env file:

cp .env.local.example .env.local

Set the environment variables in the new env file after creating an Upstash Redis instance.

Then, install the dependencies:

npm install

Finally, run the application with

npm run dev

Deploy to Vercel

To deploy to vercel, simply run

vercel

If you create a new project, you may need to set the environment variables and redeploy the app.

Unleash New Possibilities

Deploy your app on Vercel and unlock its full potential