Skip to content

Commit

Permalink
Sample Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfairbanks committed Oct 7, 2024
1 parent 32f7577 commit 4fe6813
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {APIGatewayProxyEventV2, APIGatewayProxyResultV2} from "aws-lambda";

export const handler = async (
event: APIGatewayProxyEventV2
): Promise<APIGatewayProxyResultV2<string>> => {
const message = "Hello World!";
console.log(`The event: ${JSON.stringify(event)}`);
console.log(`Returning ${message}`);
return {
statusCode: 200,
body: JSON.stringify(message),
} as APIGatewayProxyResultV2<string>;
}

0 comments on commit 4fe6813

Please sign in to comment.