Custom API Routes
Custom API Routes
Blitz.js custom API routes are exactly the same as Next.js custom API routes. If you need, read the Next.js API route documentation
- Unlike Next.js, your
api/folder must be a sibling ofpages/instead of being nested inside. - All React components inside an
api/folder are accessible at a URL corresponding to it's path insideapi/. Soapp/projects/api/webhook.tsxwill be atlocalhost:3000/api/webhook.