@bearnjs/rest
    Preparing search index...

    Class Router

    Manages routes and middleware in an application.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    basePrefix: undefined | string

    An optional prefix used when the router is mounted without a specific path.

    description: undefined | string

    An optional description for the router, useful for documentation or logging.

    name: undefined | string

    An optional name for the router, useful for identification.

    Methods

    • Function

      Handles an incoming request by executing middleware and matching routes.

      Parameters

      • req: Request

        The incoming request object.

      • res: Response

        The response object to send data back to the client.

      Returns Promise<void>

    post