Represents a server that handles serverless events and routes them to appropriate handlers.

Hierarchy (view full)

Constructors

Properties

config: RouterConfig

The configuration object for the router.

routeResolver: default

A protected property that holds a RouteResolver object. The RouteResolver is responsible for resolving routes and returning the appropriate response.

Methods

  • Returns a callable function that is bound to the handleServerlessEvent method of the current object.

    Returns CallableFunction

    • A callable function that is bound to the handleServerlessEvent method.
  • 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