simple-child

1.1.0 • Public • Published

Simple child

A real simple child process module

install:

$ npm i simple-child

usage:

var SimpleChild = require('simple-child')
var child = new SimpleChild('node ./cmd.js' /*, {options} */)
 
child.start(/* callback */)
 
child.restart(/* callback */)
 
child.stop(/* callback */)

it's as simple as that.

However there is scope for more...

myFunkyStream
  .pipe(new SimpleChild('node ./cmd.js').start())
  .pipe(process.stdout)

In this example it would pipe the output from myFunkyStream to the child process via process.stdin and pipe out anything, which is written to process.stdout or process.stderr inside the child to our outter process.stdout !!

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i simple-child

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • sonewman