0.2.0 • Published 4 years ago

proxyl v0.2.0

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

proxyl

npm version npm downloads

AWS API Gateway + Lambda proxy integration dev server.

Lifts your Lambda function into a web server that mimics the request/response format of an API Gateway proxy integration. Reloads on file changes with the power of nodemon.

Usage

Usage: proxyl [options] path/to/file.handlerName

Options:
  -a, --auth <authorizer>  path/to/authorizer.handlerName (default: "")
  -p, --port <port>        Port to listen on (default: 3000)
  -w, --watch <path>       Path(s) to watch, defaults to pwd (default: [])
  -h, --help               output usage information

The path/to/file.handlerName should be the same as the handler option specified for your Lambda function.

The -a option allows you to register a Lambda authorizer. To keep things simple, proxyl:

  • Only supports TOKEN type authorizers, with the token in the authorization header.
  • Will not cache the output of your authorizer.
  • Will only 403 for a policy with "Effect": "Deny", regardless of the "Resource".

Any "context" included in the returned policy will be added to the request as event.requestContext.authorizer to simulate how that works in a real API Gateway.

Feel free to watch multiple paths with multiple -w options, like this:

proxyl -w dist -w src src/index.handler