MVP in Minutes
Quick Start

Ratelimiting

In this section, we will set up the rate limiting for the application.

we use the @upstash/ratelimit package to implement rate limiting.

We only implement rate limiting for one endpoint which is the /api/temp endpoint.

How to configure the rate limiting

  1. Create a new Upstash account.
  2. Create a new Redis database.
  3. Copy the Redis database URL and paste it in the .env.local file.
NEXT_PUBLIC_UPSTASH_REDIS_REST_URL=
NEXT_PUBLIC_UPSTASH_REDIS_REST_TOKEN=

On this page