/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// http://nodejs.org/api.html#_child_processes var sys = require('sys') var exec = require('child_process').exec; var child; // executes `pwd` child = exec("pwd", function (error, stdout, stderr) { sys.print('stdout: ' + stdout); sys.print('stderr: ' + stderr); if (error !== null) { console.log('exec error: ' + error); } });
URL: execute-a-unix-command-with-node-js
Comments
