genie-lambda-toolbelt
v0.0.8
Published
Toolbelt for creating Lambda functions
Downloads
2
Readme
Genie Lambda Toolbelt
Set of reusable tools to make writing new Lambda functions a breeze.
Sample Usage
import { compose, httpHandler, withJSONBody } from 'genie-lambda-toolbelt';
const myHelloWorldFunction = async (event: IHTTPEvent, context: IHTTPContext): Promise<object> => {
const { genie: { body } } = context;
return {
message: `Hello, ${body.name}`,
};
};
export default compose(httpHandler, withJSONBody)(myHelloWorldFunction);