node-exec

0.1.1 • Public • Published

node-exec

Execute shell commands from NodeJS

How to use?

Simple, just install it, require it and use it

  • Install it:

npm install --save node-exec

  • Require it:
    var shell = require('node-exec');
  • Usage:
      let cmd = "pwd";
      /**
      * @params {string} cmd (required)
      */
      shell.run(cmd).then(function(res){
        // res: object with keys {code,result} or {code,error}
        console.dir(res);
      });

Package Sidebar

Install

npm i node-exec

Weekly Downloads

77

Version

0.1.1

License

LGPL-3.0

Last publish

Collaborators

  • jmlevick