mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-03 21:23:05 +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
|
|
@ -1,10 +1,10 @@
|
|||
/* module make possible connectoin thrue socket.io on a client */
|
||||
var CloudCommander, io, socket;
|
||||
var CloudCommander, io, socket, Term;
|
||||
(function(){
|
||||
"use strict";
|
||||
var Util = CloudCommander.Util;
|
||||
|
||||
Util.jsload("http://localhost:31337/socket.io/lib/socket.io.js", {
|
||||
Util.jsload("/socket.io/lib/socket.io.js", {
|
||||
onload : function(){
|
||||
socket = io.connect(document.location.hostname);
|
||||
|
||||
|
|
@ -14,6 +14,7 @@ var CloudCommander, io, socket;
|
|||
|
||||
socket.on('message', function (msg) {
|
||||
console.log(msg);
|
||||
Term.echo(msg);
|
||||
});
|
||||
|
||||
socket.on('disconnect', function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue