Skip to content

Instantly share code, notes, and snippets.

@rjcorwin
Last active April 7, 2018 00:17
Show Gist options
  • Select an option

  • Save rjcorwin/030856deff1d07b23fa66d2f42f8bf8a to your computer and use it in GitHub Desktop.

Select an option

Save rjcorwin/030856deff1d07b23fa66d2f42f8bf8a to your computer and use it in GitHub Desktop.
const util = require('util')
const exec = util.promisify(require('child_process').exec)
async example() {
console.log(await exec('ls'))
console.log(await exec('ls'))
}
example()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment