Just like the pages directory, the Nuxt server uses file-based routing to set up the API endpoints. That is, a file named hello.ts would need to be created in the /server/api/ directory in order to create an API endpoint with path /api/hello.

Get hands-on with 1200+ tech skills courses.