Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions packages/schema/src/config/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,23 @@ export default defineUntypedSchema({
/**
* Nitro server handlers.
*
* @see https://nitro.unjs.io/guide/introduction/routing
* Each handler accepts the following options:
* - handler: The path to the file defining the handler.
* - route: The route under which the handler is available. This follows the conventions of https://github.com/unjs/radix3.
* - method: The HTTP method of requests that should be handled.
* - middleware: Specifies whether it is a middleware handler.
* - lazy: Specifies whether to use lazy loading to import the handler.
*
* @see https://v3.nuxtjs.org/guide/features/server-routes
*
* @note Files from `server/api`, `server/middleware` and `server/routes` will be automatically registered by Nuxt.
*
* **Note:** Files from `server/api`, `server/middleware` and `server/routes` will be automatically registred by Nuxt.
* @example
* ```js
* serverHandlers: [
* { route: '/path/foo/**:name', handler: '~/server/foohandler.ts' }
* ]
* ```
*
* @type {typeof import('nitropack')['NitroEventHandler'][]}
* @version 3
Expand Down