Stone.js API
    Preparing search index...
    • Middleware decorator to mark a class as middleware within the Stone.js framework.

      This decorator is used to customize classes as middleware, allowing them to be registered and managed as part of the request/response lifecycle or other layers such as adapter, kernel, or router.

      Type Parameters

      Parameters

      • options: MiddlewareOptions = {}

        The configuration options for the middleware, including platform, priority, singleton registration, alias, layer, and type.

      Returns ClassDecorator

      A decorator function to set metadata on the target class.

      @Middleware({ params: ['node'], priority: 1, global: true, alias: 'MyMiddleware' })
      class MyMiddleware {
      // Middleware class logic here.
      }