Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds callback parameter to ENV loader #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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