1.0.1 • Published 3 years ago

@yehonadav/serverless-event-getters v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

lambdaHttp

http helpers for serverless http requests.

install

npm i @yehonadav/lambdaHttp

usage

import {createHandler, AsyncHandler, httpOkResponse} from "@yehonadav/lambdahttp"

let handler: AsyncHandler = async (event) => {
  // do something
  // ...
  const responseData = {
    dataint: 3,
    dataintlist: [1,2,3],
  };
  
  return httpOkResponse({
    body: responseData,
  });
};

handler = createHandler(handler);

export { handler };

enjoy =)