An open API service indexing awesome lists of open source software.

https://github.com/niradler/appless-lambda

appless-lambda
https://github.com/niradler/appless-lambda

express lambda nodejs serverless

Last synced: 9 months ago
JSON representation

appless-lambda

Awesome Lists containing this project

README

          

# appless-lambda

```
npm i -S appless-lambda
```

```
const App = require("appless-lambda");
const httpMiddleware = require("appless-lambda/middlewares/httpMiddleware");

const hello = async ({ req, res }) => {
const { params } = req;

return res.json({ params, midUse: req.event.midUse });
};

const app = new App();

app.use(params => {
params.event.midUse = true;
return params;
});

app.use(httpMiddleware);

app.controller(hello);

module.exports.handler = app.start.bind(app);

```