Represents a Proxy class that handles routing and server functionality.

Constructors

Methods

Constructors

  • Constructs a new instance of the Router class.

    Parameters

    • config: RouterConfig

      The configuration object for the router.

    • serverlessHandler: ((event: APIGatewayProxyEvent, context: Context) => Promise<void>)

      The handler function for serverless events.

        • (event, context): Promise<void>
        • Handles a serverless event by executing a transaction and resolving the route based on the event.

          Parameters

          • event: APIGatewayProxyEvent

            The serverless event object.

          • context: Context

            The serverless context object.

          Returns Promise<void>

          None

    Returns default

    None

Methods

  • Unloads the current module, stopping any active listeners.

    Parameters

    • Optionalerr: any

      Optional error object to pass to the stopListeners method.

    Returns Promise<void>

    • A promise that resolves once the listeners have been stopped.