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

Support for async/await main handler #52

Closed
jeremydaly opened this issue Jun 27, 2018 · 1 comment
Closed

Support for async/await main handler #52

jeremydaly opened this issue Jun 27, 2018 · 1 comment
Milestone

Comments

@jeremydaly
Copy link
Owner

Now that Lambda supports v8.10, we should be able to declare our main handler like this:

exports.handler = async (event, context) => {
  // Run the request
  return api.run(event, context)
}

This should be optional for backwards compatibility.

@jeremydaly jeremydaly added this to the v0.8 milestone Jun 27, 2018
@jeremydaly
Copy link
Owner Author

Added in some magic to make this happen, but if used, route functions need to use async/await. Might need some more testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant