Skip to content

Commit b62a8ad

Browse files
committed
add instruction for local testing in readme
1 parent e687de0 commit b62a8ad

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Examples/Streaming/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ swift package archive --allow-network-connections docker
3434
If there is no error, there is a ZIP file ready to deploy.
3535
The ZIP file is located at `.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/StreamingNumbers/StreamingNumbers.zip`
3636

37+
## Test locally
38+
39+
You can test the function locally before deploying:
40+
41+
```bash
42+
swift run
43+
44+
# In another terminal, test with curl:
45+
curl -v \
46+
--header "Content-Type: application/json" \
47+
--data '"this is not used"' \
48+
http://127.0.0.1:7000/invoke
49+
```
50+
3751
## Deploy with the AWS CLI
3852

3953
Here is how to deploy using the `aws` command line.

0 commit comments

Comments
 (0)