node.js - NPM.JS plugin for accessing the linux terminal -
here situation. i'm working on application uses node.js. however, cannot find plugin shut down system without intervention. figured if can access bash (the command line linux) should able enter shutdown -h -p now
. ideally, code this:
var commander = require('commander'); // example commander.command("shutdown -h -p now");
and shut down system. reading this, , help! if can find either module shutdown system, or module can access terminal, appreciated.
i think built in native. https://nodejs.org/api/child_process.html.
you can google around examples.
also. can check out shell.js module
Comments
Post a Comment