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

ParameterTypeDescription
appTAppThe instance of your app (Express, Fastify, Koa, etc...)
requestIncomingMessageThe request object that will be forward to your app
responseServerResponseThe response object that will be forward to your app to output the response

Returns:

void