1.8.2 • Published 3 years ago

@theide/api-gateway v1.8.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Api Gateway normalizations

Just a simple package that will normalize the Api Gateway structures

const { app, json, error } = require('@theide/api-gateway')

module.exports = async event => app(event)
  .then(json_body)
  .then(async ({req, res}) => {
    res.body = {test: true}

    return {req, res} // next middleware
  })
  .then(json) // send json response
  .catch(error)
1.8.2

3 years ago

1.8.0

3 years ago