Karolis Stulgys
04/27/2022, 2:43 PMKarolis Stulgys
04/27/2022, 2:43 PMconst api = new sst.Api(this, "Api", {
routes: {
$default: {
function: {
handler: "src/lambda.handler",
},
},
},
});
Karolis Stulgys
04/27/2022, 2:44 PMexport async function handler(event) {
return nestJsAppHandler(event);
}
Karolis Stulgys
04/27/2022, 2:45 PMexport const handler: Handler = async (
event: any,
context: Context,
callback: Callback,
) => {
server = server ?? (await bootstrap());
return server(event, context, callback);
};
Frank
const api = new sst.Api(this, "Api", {
routes: {
$default: {
function: {
handler: "src/lambda.handler",
environment: {
HELLO: "world",
},
},
},
},
});