Skip to content

gibrancordoba/lambda-proxy-responses

Repository files navigation

lambda-proxy-response

A Typescript Node.js package that create and generate responses into Lambda proxy.

Installation

Getting Started

You will need to import the node module into your file:

  import ResponseBuilder from 'lambda-proxy-responses';

Usage

  ResponseBuilder.ok('this is a new response', cb);
  ResponseBuilder.ok({message: 'this is a new response'}, cb);
  ResponseBuilder.notFound('object notFound', cb);
  ResponseBuilder.serverError(500, new Error('this is a new response'), cb);

Response Type support

  • ok
  • notFound
  • badRequest
  • forbidden
  • serverError
  • internalServerError

License

Not yet

forthebadge forthebadge forthebadge