@h4ad/serverless-adapter
Version:
Run REST APIs and other web applications using your existing Node.js application framework (NestJS, Express, Koa, Hapi, Fastify and many others), on top of AWS, Azure, Digital Ocean and many other clouds.
21 lines (18 loc) • 707 B
TypeScript
import { IncomingMessage, ServerResponse } from 'http';
/**
* The interface that represents a contract between the framework and the framework implementation
*
* @breadcrumb Contracts
* @public
*/
interface FrameworkContract<TApp> {
/**
* Send the request and response objects to the framework
*
* @param app - The instance of your app (Express, Fastify, Koa, etc...)
* @param request - The request object that will be forward to your app
* @param response - The response object that will be forward to your app to output the response
*/
sendRequest(app: TApp, request: IncomingMessage, response: ServerResponse): void;
}
export type { FrameworkContract as F };