Skip to main content

Basic Route Example

A minimal API route that responds to GET:

// api/hello/route.ts
import type { BurgerRequest } from "burger-api";

export function GET(req: BurgerRequest) {
return Response.json({ message: "Hello, Burger API!" });
}

This maps to GET /api/hello (with default apiPrefix). See Static Routes and Hello World tutorial.