0.0.8 • Published 5 years ago
genie-lambda-toolbelt v0.0.8
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);