added ability to execute commands on server thrue terminal

This commit is contained in:
coderaiser 2012-09-20 11:13:49 -04:00
parent aa7befc238
commit b52910a2cf
7 changed files with 21 additions and 20 deletions

View file

@ -20,7 +20,7 @@ exports.listen = function(pServer){
socket.on('message', function(pCommand) {
console.log(pCommand);
exec(pCommand, exec);
exec(pCommand, getExec);
});
});
@ -33,7 +33,7 @@ exports.listen = function(pServer){
* @param stdout
* @param stderr
*/
function exec(error, stdout, stderr) {
function getExec(error, stdout, stderr) {
if(stdout){
console.log(stdout);
Socket.send(stdout);