Documentation
    Preparing search index...

    Brisk routes exposes the API to configure the route handler by chaining one of the pre-defined methods.

    For example: Instead of defining the redirect logic as a callback, one can chain the .redirect method.

    Brisk routes are always registered under the GET HTTP method.

    Hierarchy

    • default
      • BriskRoute
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    route: null | Route<any> = null

    Reference to route instance. Set after setHandler is called

    Methods

    • Redirects to a given route. Params from the original request will be used when no custom params are defined.

      Type Parameters

      • Identifier extends string

      Parameters

      • ...args: []

        Route identifier, parameters, and options for building the redirect URL

      Returns Route

      The created route instance

    • Redirect request to a fixed URL

      Parameters

      • url: string

        The URL to redirect to

      • Optionaloptions: { status: number }

        Optional redirect options including HTTP status code

      Returns Route

      The created route instance