Prompt API

Add a Nuxt Server Route

Create a Nuxt server API route with validation and error handling.

vuenuxt
Insert label Server Route
Prompt

Create a server route in server/api/. Use defineEventHandler, validate the request body or query params, handle errors with createError, and return a typed response. Follow the existing server route patterns in this project.

Add this to your Facet Inserts in Crystl for one-click access.

Get Crystl