Skip to content

Instantly share code, notes, and snippets.

@saiumesh535
Last active November 3, 2017 06:38
Show Gist options
  • Save saiumesh535/28a6ef09264dfcbfaac5580537893774 to your computer and use it in GitHub Desktop.
Save saiumesh535/28a6ef09264dfcbfaac5580537893774 to your computer and use it in GitHub Desktop.
Asyncawait
async function check(req, res) {
try {
const a = await someOtherFunction();
const b = await somethingElseFunction();
res.send("result")
} catch (error) {
res.send(error.stack);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment