Creates an async function that handles serverless events and sends a response.

  • Parameters

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

      The serverless handler function.

        • (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 ((request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>) => Promise<void>)

    • An async function that handles the request and sends a response.
      • (request, res): Promise<void>
      • Parameters

        • request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
        • res: Response<any, Record<string, any>>

        Returns Promise<void>