Skip to main content

FrameworkContract

@h4ad/serverless-adapter > FrameworkContract

(interface) FrameworkContract

The interface that represents a contract between the framework and the framework implementation

Signature:

export interface FrameworkContract<TApp> 

(method) sendRequest

Send the request and response objects to the framework

Signature:

sendRequest(app: TApp, request: IncomingMessage, response: ServerResponse): void;

Parameters

Parameter

Type

Description

app

TApp

The instance of your app (Express, Fastify, Koa, etc...)

request

IncomingMessage

The request object that will be forward to your app

response

ServerResponse

The response object that will be forward to your app to output the response

Returns:

void