Code Explainers

Code explainers tagged #api-routes

javascript
import { NextResponse } from 'next/server';
import { Redis } from '@upstash/redis';
 
export const runtime = 'edge';

A deduped page-view counter in Next.js

edge-runtime redis rate-limiting
Intermediate 8 steps