node-ipc/node_modules/node-cmd/example/basic.js

17 lines
297 B
JavaScript
Raw Normal View History

2014-09-03 16:25:35 +10:00
var cmd=require('../cmd.js');
cmd.get(
'pwd',
function(data){
console.log('the current working dir is : ',data)
}
);
cmd.run('touch example.created.file');
cmd.get(
'ls',
function(data){
console.log('the current dir contains these files :\n\n',data)
}
);