Next.js 16 · Routing and files
Create an API route
A route.ts file exports a function per HTTP method.
export async function GET() {
return Response.json({ ok: true });
}
Official Next.js 16 documentation
Next.js 16 · Routing and files
A route.ts file exports a function per HTTP method.
export async function GET() {
return Response.json({ ok: true });
}
Official Next.js 16 documentation
Was this page helpful?