Route.mount constructor

const Route.mount(
  1. String path,
  2. Handler handler
)

Declares a subtree handled by handler, rooted at path.

The handler sees paths relative to path, the way shelf_router.mount and axum's nest_service both work, so a handler written for the root of its own world keeps working when mounted deeper.

Implementation

const Route.mount(this.path, this.handler)
    : method = anyMethod,
      isMount = true;