Nuxt TypeScript Nuxt TypeScript
    • Introduction
  • 指南

    • 介绍
    • 安装设置
    • 运行时 (可选)
    • 代码检查
  • 更多使用方式

    • 组件
    • 中间件
    • 插件
    • Store
    • 配置文件 (运行时)
    • 模块 (运行时)
    • 服务器渲染中间件 (运行时)
  • 示例

    • Options API
    • Class API
    • Composition API
  • More

    • English
    • 日本語
    • Español
    • Português
    • 繁體中文

服务器渲染中间件 (运行时)

import { ServerMiddleware } from '@nuxt/types'

const myServerMiddleware: ServerMiddleware = function (req, res, next) {
  // 使用 req, res, next
}

export default myServerMiddleware
在 GitHub 上编辑此页面
模块 (运行时) Options API
  • English
  • 日本語
  • Español
  • Português
  • 繁體中文