NodeJs Exec Wrapper
A simple node js exec wrapper
Syntax Async
args = { command, debug }
command = string
debug = boolean optional # will show console output
callback = (result,error)=> {}
Execute.async(args, callback)
Syntax Sync (Promise)
args = { command, debug }
command = string
debug = boolean optional # will show console output
Execute.sync(args)
Usage
const Execute = require('@achievewithoutborders/node-exec')
Execute.async({ 'ls', debug: true }, (result, error) =>
console.log(result, error)
)
Execute.sync(args).then(res => console.log(res))