Route contains information to adding/registering new route with the router. Method+Path pair uniquely identifies the Route. It is mandatory to provide Method+Path+Handler fields.

Hierarchy

  • Route

Methods

  • ForGroup recreates Route with added group prefix and group middlewares it is grouped to.

    Parameters

    Returns Routable

  • ToRoute returns Route which Router uses to register the method handler for path.

    Returns Route

Properties

handler: HandlerFunc
method: string
middlewares: MiddlewareFunc[]
name: string
path: string

Generated using TypeDoc