# aws-lambda-express

> Express for AWS Lambda

Latest version **1.0.2** (published 2018-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install aws-lambda-express
pnpm add aws-lambda-express
yarn add aws-lambda-express
bun add aws-lambda-express
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-11-20 |
| First published | 2018-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | LCHarold |
| Maintainers | lcharold |

## Links

- npm: https://www.npmjs.com/package/aws-lambda-express
- Repository: https://github.com/LCHarold/aws-lambda-express
- Homepage: https://github.com/LCHarold/aws-lambda-express#readme
- Issues: https://github.com/LCHarold/aws-lambda-express/issues
- npm.io page: https://npm.io/package/aws-lambda-express

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) latest
- [express](https://npm.io/package/express.md) ^4.16.3
- [pipeworks](https://npm.io/package/pipeworks.md) latest

## Recent versions

- 1.0.2 (latest) — 2018-11-20
- 1.0.1 — 2018-05-24
- 1.0.0 — 2018-05-22

## README

# aws-lambda-express
Express for AWS Lambda. Based on Roman Kinyakin's blog post: https://viblo.asia/p/expressjs-style-flow-for-aws-lambda-vyDZOXa9lwj. Because aws-serverless-express wasn't working for my purposes.

## Installation
```
npm install aws-lambda-express --save
```

## Usage
Usage is similar to the app.use() pattern you may be used to with express, just a little bit more verbose:
```
import { Use } from "aws-lambda-express"

module.exports.testHttp = Use(
  (req, res, next) => {
    req.middlewareOneExecuted = true
    next()
  },
  (req, res) => {
    res.send({
      m1: req.middlewareOneExecuted,
      m2: true,
    })
  }
)
```

## Example
The example uses ts-node and serverless-offline. Clone this repo. Then from \example folder, run the example from the command line with:
```
npm run start
```

Then interact with the endpoint at http://localhost:3000.

For example, hit http://localhost:3000/hello

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