# lambda-proxy-server

> Standalone, minimalistic server and listener for simulating API Gateway Lambda Proxy integration.

Latest version **0.0.3** (published 2020-04-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install lambda-proxy-server
pnpm add lambda-proxy-server
yarn add lambda-proxy-server
bun add lambda-proxy-server
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2020-04-14 |
| First published | 2019-05-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mateusz Stawecki |
| Maintainers | stawecki |
| Keywords | serverless, nodejs, AWS Lambda, API Gateway, lambda, proxy, server, http |

## Links

- npm: https://www.npmjs.com/package/lambda-proxy-server
- Repository: https://github.com/stawecki/lambda-proxy-server
- Homepage: https://github.com/stawecki/lambda-proxy-server#readme
- Issues: https://github.com/stawecki/lambda-proxy-server/issues
- npm.io page: https://npm.io/package/lambda-proxy-server

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2020-04-14
- 0.0.2 — 2019-05-28
- 0.0.1 — 2019-05-27

## README

# lambda-proxy-server

Standalone, minimalistic server and listener for simulating API Gateway Lambda Proxy integration.

_For Node.js Lambdas only._

**Note:** For local development only. Many API Gateway features are missing.

**Features:**

* Compatible with: [aws-serverless-express](https://github.com/awslabs/aws-serverless-express) and [lambda-api](https://github.com/jeremydaly/lambda-api)
* Standalone - run without SAM CLI or Serverless Framework
* Listener support - bring your own server or attach to router.
* POST body data support

## Usage

Install:
```
npm install lambda-proxy-server
```

There are multiple ways in which you can use this module:

* Create a server script:
```javascript
const server = require("lambda-proxy-server").createServer({
    handler: require("./path/to/lambda")["methodName"]
});
server.listen(8080, function () {
    console.log("Listening on http://localhost:" + server.address().port + "/");
});
```

* Or, use the "run" script:
```bash
export LAMBDA_PATH="`pwd`/mylambda/handler"; \
export LAMBDA_FUNC="run"; \
export PROXY_PORT="8907"; \
node ./node_modules/lambda-proxy-server/run
```

## Credits

Based on this [gist](https://gist.github.com/Sleavely/f87448d2c1c13d467f3ea8fc7e864955) by [Sleavely](https://github.com/Sleavely).

---
_Source: https://npm.io/package/lambda-proxy-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
