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
- Host: GitHub
- URL: https://github.com/niradler/appless-lambda
- Owner: niradler
- License: mit
- Created: 2019-10-28T23:40:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:14:33.000Z (over 3 years ago)
- Last Synced: 2025-02-18T10:45:03.602Z (about 1 year ago)
- Topics: express, lambda, nodejs, serverless
- Language: JavaScript
- Homepage:
- Size: 392 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
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);
```