Use like:
// lambda.ts
import {
APIGatewayProxyEvent,
APIGatewayProxyResult,
Context,
} from "aws-lambda";
import app from "./app";
// Your AWS Lambda handler
export const handler = async (
event: APIGatewayProxyEvent,
context: Context
): Promise<APIGatewayProxyResult> => {
return app.getLambdaResponse(event, context);
};
// app.ts
import express, { NextFunction, Request, Response, Router } from "./express";
const app = express();
export default app;