Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,14 @@ npm test

## CLI Usage

Invoke the handler locally with a JSON event file:
Invoke the handler locally with a JSON event file. You can run it directly
with `npx` or after installing the package globally:

```bash
npm run invoke -- examples/http-v1.json
npx aws-lambda-nodejs-handler invoke examples/http-v1.json
# or
npm install -g aws-lambda-nodejs-handler
invoke examples/http-v1.json
```

Sample payloads for all supported sources live under the `examples/` directory.
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "1.0.0",
"description": "This is a handler for all AWS Lambda invocations.",
"main": "index.mjs",
"bin": {
"invoke": "bin/invoke.js"
},
"scripts": {
"lint": "eslint .",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
Expand Down
Loading