Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Created August 16, 2011 04:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpodwysocki/1148461 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/1148461 to your computer and use it in GitHub Desktop.
RxJS and node.js Child Processes
var rx_child_process = require('./rx_child_process');
rx_child_process.exec('dir /w').Subscribe(function(x) {
console.log('stdout: ' + x.stdout);
console.log('stderr: ' + x.stderr);
});
rx_child_process.exec('foo').Subscribe(function(x) {
console.log('stdout: ' + x.stdout);
console.log('stderr: ' + x.stderr);
}, function(e) {
console.log('err code: ' + e.code); // prints 1
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment