Last active
January 1, 2020 02:09
-
-
Save hamzamu/6661dcf4fd3b51d8d5ebbce4deb098fa to your computer and use it in GitHub Desktop.
Meteor Promise: Await
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://blog.meteor.com/using-promises-and-async-await-in-meteor-8f6f4a04f998 | |
import { Promise } from 'meteor/promise'; | |
async function run(command) { | |
log('Running: ', command); | |
return execSync(command).toString().trim(); | |
} | |
const rows = Promise.await(run(command)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment