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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -