Skip to content

Commit 833686f

Browse files
author
Zijing Zhao
committed
ignore built folder
1 parent 5aede62 commit 833686f

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@ https://levelup.gitconnected.com/how-to-use-typescript-for-aws-lambda-in-3-steps
77
$ cd hello-world
88
$ npm run compile
99
$ cd ..
10-
$ sam package --s3-bucket sam-lambda-ts && sam deploy --s3-bucket sam-lambda-ts
10+
$ sam deploy
1111
```
12+
13+
## Test
14+
```
15+
$ curl https://<endpoint id>.execute-api.us-east-1.amazonaws.com/Prod/hello/?a=1
16+
Queries: {"a":"1"}
17+
```

hello-world/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
built

hello-world/built/app.js

-11
This file was deleted.

hello-world/built/app.js.map

-1
This file was deleted.

hello-world/src-ts/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { APIGatewayProxyEvent, APIGatewayProxyResult } from "aws-lambda";
33
export const lambdaHandler = async (
44
event: APIGatewayProxyEvent
55
): Promise<APIGatewayProxyResult> => {
6-
const queries = JSON.stringify(event.body);
6+
const queries = JSON.stringify(event.queryStringParameters);
77
return {
88
statusCode: 200,
99
body: `Queries: ${queries}`

0 commit comments

Comments
 (0)