Nuxt/packages/kit/src/server.ts

7 lines
223 B
TypeScript

import { useNuxt } from './context'
/** Adds a new server middleware to the end of the server middleware array. */
export function addServerMiddleware (middleware) {
useNuxt().options.serverMiddleware.push(middleware)
}