Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 534 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 534 Bytes

Middy JSON API Parser

This is a middy middleware, which is parsing AWS API Gateway events according to the JSON:API spec.

Installation

npm install @joblocal/middy-json-api-parser

Usage

# handler.js
const middy = require('middy');
const jsonApiParser = require('@joblocal/middy-json-api-parser');

const yourHandler = (event) => {
  console.log(event.data);
};

const handler = middy(yourHandler)
  .use(jsonApiParser());

module.exports = { handler };