Nuxt will automatically read in any files in the`~/server/api`directory to create API endpoints.
Each file should export a default function that handles api requests. It can return a promise or JSON data directly or use `res.end()`. API routes are powered by [h3](https://github.com/unjs/h3).