1.0.21-d1fa702 • Published 4 years ago
@koeroesi86/node-lambda-invoke v1.0.21-d1fa702
Node Lambda invoke
A library that can be easily used for AWS lambda functions locally
Dependencies
Usage
yarn add @koeroesi86/node-lambda-invoke
Or with npm
npm i --save @koeroesi86/node-lambda-invoke
Example
const http = require('http');
const { httpMiddleware } = require('@koeroesi86/node-lambda-invoke');
const host = 'localhost';
const port = 8080;
const lambdaPath = './pathOfLambda.js';
const handlerKey = 'handler';
const logger = console.log;
const limit = 100; // overall limit ox running lambdas
http
.createServer(httpMiddleware({
lambdaPath,
handlerKey,
logger,
limit,
communication: {
// file|ipc|custom --- When 'custom' used, path is needed
type: 'ipc',
}
}))
.listen(
{ host, port, exclusive: true },
() => console.log(`Server running on http://${host}:${port}`)
);
Running locally
yarn start
Configuration
Coming soon, currently a basic .env
way is available...
1.0.21-d1fa702
4 years ago
1.0.20-d1fa702
5 years ago
1.0.19-eb9e1ff
5 years ago
1.0.18-b7bb012
5 years ago
1.0.17-928f791
5 years ago
1.0.12-83a1866
5 years ago
1.0.11-c2a28f4
5 years ago
1.0.10-8e06e59
5 years ago
1.0.9-5e55de5
5 years ago
1.0.8-7b807d9
5 years ago
1.0.7-aaa1c53
5 years ago
1.0.6-7ac85e1
5 years ago
1.0.5-bb4b521
5 years ago
1.0.4-cca37f7
5 years ago
1.0.3-c8b73d8
5 years ago
1.0.2-fbed66e
5 years ago