Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 912 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 912 Bytes

nuxt-api

Server API endpoints and Middleware are added by Nitro that internally uses h3.

Key features include:

  • Handlers can directly return objects/arrays for an automatically-handled JSON response
  • Handlers can return promises, which will be awaited (res.end() and next() are also supported)
  • Helper functions for body parsing, cookie handling, redirects, headers and more

View the Docs

Express.js Handlers & Middleware

fromNodeMiddleware enables the use of legacy handlers and middleware, though they don't play well with Nuxt's automatic scanning of the server/api directory.

Quick Start

$ nvm use
$ npm run dev

Open http://localhost:3000 with your browser to see the result.