Stone.js API
    Preparing search index...
    • Build-phase middleware: registers the two contract routes, with their paths taken from configuration.

      A middleware rather than static route definitions on the blueprint, because the paths are configurable and the blueprint constant is evaluated before the application has said anything. Reading configuration is only safe once everything has been collected, which is why it reads AFTER next, and it returns what next returned: a build-phase middleware that returns its own value replaces the blueprint for every later phase.

      Both routes are added to stone.router.definitions, the same array the router scans, so nothing here depends on the router package itself.

      Parameters

      • context: BlueprintContext<IBlueprint>

        The blueprint context.

      • next: NextMiddleware<
            BlueprintContext<IBlueprint, ClassType<any> | PipeClass>,
            IBlueprint,
        >

        The next blueprint middleware.

      Returns Promise<IBlueprint>

      The blueprint.