local-api-gateway

1.0.3 • Public • Published

Description:

Building an API Gateway in AWS is rather simplistic. One benefit of API Gateway, is that it can export the swagger definitions. Other than using this definition for documentation, you can also use it to drive your integration tests with the implementing lambdas.

Example:

const lambda     = require('../index.js');
const startApiGateway = () => apigateway(lambda, './swagger.yaml')
  .then(httpServer => {
    http.server = httpServer;
  });
  before(() => {
    api.start();
    return startApiGateway();
  });

Credits:

Draws inspiration from: https://github.com/ToQoz/api-gateway-localdev

Package Sidebar

Install

npm i local-api-gateway

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

19.4 kB

Total Files

6

Last publish

Collaborators

  • akutta