Stone.js API
    Preparing search index...
    • Where a declared middleware belongs.

      Three layers, because there are three: the application's own middleware, the kernel's, and the router's, which is the only one that runs with a route matched and can therefore read what a route declares. global: true keeps meaning the kernel, and layer wins when both are given, since naming the layer is the more precise statement.

      A middleware needing the matched route previously had nowhere to be declared from: both branches led to the kernel, where nothing has been matched yet. Writing a key another module reads is how a blueprint works, and how @AdapterMiddleware has always reached stone.adapter.middleware: an unread key costs nothing when that module is absent.

      Parameters

      Returns string

      The blueprint key to add it to.