Skip to main content

Api

Nuxt.js Server Routes and API Endpoints: Build Full-Stack Apps

Introduction # One of Nuxt.js’s greatest strengths is that it’s a full-stack framework. You can build both your frontend and backend in the same project. Nuxt server routes let you create API endpoints without leaving your Vue.js application, eliminating the need for a separate backend server. What Are Server Routes? # In Nuxt, any file in the server/routes/ directory automatically becomes an API endpoint. Similarly, files in server/api/ are automatically prefixed with /api/.