Sequence NODE_209
EasyCreate API Route for JSON Data
Next.js
Node.js
JavaScript
Technical Specification
Create a basic API route that returns a JSON response.
Input/Output Samples
Input:/api/status
Output:{ ok: true }
Optimal Logic Path
// app/api/status/route.ts
export function GET() {
return Response.json({ ok: true });
}Architectural Deep-Dive
API routes let you add backend logic inside the same Next.js app.