new-api-route
Installation
SKILL.md
New API Route
Create API routes following project conventions for Next.js App Router.
Instructions
-
Determine route path and HTTP methods needed
-
Create route file at
src/app/api/<path>/route.ts -
Use this template:
import { NextResponse } from 'next/server'; import { sql } from '@/lib/db'; export const dynamic = 'force-dynamic';