Skip to content

Conversation

barwick
Copy link

@barwick barwick commented Jul 14, 2016

Adds a "cb" parameter to the ENV var pre load handler, allowing callbacks to be used: e.g. of the form handler (event, context, cb) => {}.

Had a function looking something like this:

module.exports.handler = (event, context, cb) => {
  console.log(event, context, cb)
  return cb(null, 'Success!');
};

Serverless was returning the error

cb is not a function

Since it was always undefined. I didn't have the ability to pass a callback through the babel transpiled code, so this change adds that functionality.

…to be used: e.g. of the form handler (event, context, cb) => {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant