How to use the hops-lambda/lambda.handler function in hops-lambda

To help you get started, we’ve selected a few hops-lambda examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xing / hops / packages / spec / integration / lambda / __tests__ / build.js View on Github external
function invokeFunction(root, path) {
  process.chdir(root);
  const { handler } = require('hops-lambda/lambda');
  return handler({ requestContext: { path }, path }, {}).then(response => {
    if (response.isBase64Encoded) {
      response.body = Buffer.from(response.body, 'base64').toString('utf-8');
    }
    return response;
  });
}

hops-lambda

Quick and easy deployment of Hops applications to AWS Lambda

MIT
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis