question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example with async handler?

See original GitHub issue

💡 Feature description

I would like to see examples using async handlers (is it supported already?). The echo, http and multi examples only show sync handlers.

💻 Basic example

Does something like this already work?

fn main() {
    lambda!(handler)
}

async fn handler(
    event: Value,
    _: Context,
) -> Result<Value, HandlerError> {
    f().await?
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
softpropscommented, Jun 3, 2020

@amaurymartiny all examples and templates have been updated to use the latest async version of the rust lambda runtime which is at this time an unreleased git dependency. When it’s released I’ll update to reflect the crates.io release

0reactions
kahlil29commented, Jun 1, 2020

@amaurymartiny I hope this helps you. I think I was tagged by mistake 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 5 express-async-handler Code Examples - Snyk
To help you get started, we've selected a few express-async-handler examples, based on popular ways it is used in public projects.
Read more >
express-async-handler JavaScript and Node.js code examples
Best JavaScript code snippets using express-async-handler(Showing top 13 results out of 315). origin: mifi/in-app-subscription-example ...
Read more >
Using async/await in Express - Zell Liew
To use async/await, you need to use the async keyword when you define a request handler. (Note: These request handlers are also called...
Read more >
express-async-handler examples - CodeSandbox
Learn how to use express-async-handler by viewing and forking example apps that make use of express-async-handler on CodeSandbox. ; proshopMERN shopping cart app....
Read more >
Promise handlers for cleaner async syntax | by Evan Burbidge
The promise handler is a simple function. It is a function that takes a promise as an argument and resolves or rejects it....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found