Added title bar and basic message and command input

This commit is contained in:
khlieng 2015-01-21 03:06:34 +01:00
parent 508a04cf4c
commit f42d6011c6
23 changed files with 399 additions and 83 deletions

View file

@ -1,4 +1,5 @@
var EventEmitter = require('events').EventEmitter;
var _ = require('lodash');
var sockets = {};
@ -8,7 +9,7 @@ function createSocket(path) {
return sockets[path];
} else {
var ws = new WebSocket('ws://' + window.location.host + path);
var sock = {
send: function(type, data) {
ws.send(JSON.stringify({ type: type, request: data }));