mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 18:23:35 +00:00
added ability to execute commands on server thrue terminal
This commit is contained in:
parent
aa7befc238
commit
b52910a2cf
7 changed files with 21 additions and 20 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue