@koeroesi86/node-lambda-invoke
v1.0.21-d1fa702
Published
A local Lambda implementation
Readme
Node Lambda invoke 
A library that can be easily used for AWS lambda functions locally
Dependencies
Usage
yarn add @koeroesi86/node-lambda-invokeOr with npm
npm i --save @koeroesi86/node-lambda-invokeExample
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 startConfiguration
Coming soon, currently a basic .env way is available...
