sudo-js
Using sudo with password for node-js.
sudo-js by default has support for windows, linux and osx. But the root access (UAC) in Windows is not running. This feature will be added later.
Install npm install sudo-js --save
Running
basic
var sudo = ;sudo; var command = 'chmod' '0777' '/Users/didanurwanda/Downloads';sudo;
performance optimizer
var sudo = ;sudo; var options = check: false withResult: false;var command = 'chmod' '0777' '/Users/didanurwanda/Downloads';sudo;
check password
var sudo = ;sudo; sudo;
API
- password
- setPassword (string)
- check (function)
- exec (array, object|function, function)
- killByPid (int, function)
- killByName (string, function)
Options
check
check password before executewithResult
sending result in callback
Contributor
Dida Nurwanda