Tools•generator
Vercel for Nuxt
Creates boilerplate code for Nuxt 3 server routes and API layers with correct file structure and exports.
Try the tool
client runnerGenerated server route code
Run the tool to see output.
Examples
Generate GET API route
{
"routeName": "users",
"method": "GET",
"routeType": "api"
}Expected output
export default defineEventHandler(async (event) => {
return { data: [] };
});Generate POST server route
{
"routeName": "submit",
"method": "POST",
"routeType": "server"
}Expected output
export default defineEventHandler(async (event) => {
const body = await readBody(event);
return { status: 201 };
});How it works
Inputs determine the route type (API/server) and HTTP method. The tool generates a file in /server/api or /server/routes with the correct exports and event handler structure for Nuxt 3.