Skip to content

Commit 4b7d019

Browse files
committed
Add local test with SAM CLI in the README
1 parent f83bfd8 commit 4b7d019

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/remix/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,13 @@ $ docker run -d -p 3000:3000 {ECR Image}
7878
```
7979

8080
Open web browser to visit `http://localhost:3000/`
81+
82+
## Local test with SAM CLI
83+
84+
In general, you can test your web app locally without simulating AWS Lambda execution environment. But if you want to simulate Lambda and API Gateway locally, you can use SAM CLI.
85+
86+
```shell
87+
sam local start-api --warm-containers EAGER --region us-west-2
88+
```
89+
90+
This command will start a local http endpoint and docker container to simulate API Gateway and Lambda. Please modify the region to match the actual region you are using. You can test it using `curl`, `postman`, and your web browser.

0 commit comments

Comments
 (0)