0.0.14 • Published 2 years ago

@funnel-io/lalr v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

LALR

Local API Gateway-lambda runner.

Runs your lambda locally with hot reloading through an API-gateway mock.

Features

  • Is able to listen to your source code and react to changes. Is also able to compile your code when that happens.
  • Starts a web server at 127.0.0.1:8080 and will through various adapters run your code and return it the HTTP client.

Language support:

  • JavaScript
  • TypeScript
  • Python

Dependencies

Due to esbuild having difficult bundling nodemon, it's required to have in your node environment before running.

Motivation

AWS' sam has a CLI tool has a command sam local start-api, that will take a yaml file and start an API gateway mock HTTP server. The problem with this is that there no support to hot reload your code from a built asset folder, you manually need to run sam build to build your lambda and then run it. If you're using aws-cdk to deploy your code, it doesn't really make sense to build your lambda with sam build.

Usage

yarn add --dev @funnel-io/lalr

TypeScript

$ yarn lalr --lambda-path dist/index.js --lambda-handler lambdaHandler --build-language ts --build "yarn tsc"

JavaScript

$ yarn lalr --lambda-path dist/index.js --lambda-handler lambdaHandler --build-language js

Python

$ yarn lalr --lambda-path handler.py --lambda-handler handler --build-language python

Run example lambda

$ yarn lalr --lambda-path example-dist/index.js --lambda-handler myHandler --build-language js

$ curl -H "x-hello: test" "http://localhost:8080?queryParam=hello"

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago