X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=server.coffee;h=5d5ca3539148fa7f336b0d1401c4b6df0304b053;hb=f864b5a4731e5ab5148b5fe20533e71691cf6955;hp=32daeffbcd2c802c05c516d5f80af903fedd1e12;hpb=e80ebd564e2216cf66d839520e91c4d17ec9e177;p=watch-my-terminal.git diff --git a/server.coffee b/server.coffee index 32daeff..5d5ca35 100644 --- a/server.coffee +++ b/server.coffee @@ -12,6 +12,9 @@ handler = (req, res) -> when '/terminal.js' filename = __dirname + '/terminal.coffee' type = 'text/javascript' + when '/client.js' + filename = __dirname + '/client.coffee' + type = 'text/javascript' else return reply_err req, res fs.readFile filename, 'utf8', (err, data) -> @@ -34,7 +37,7 @@ terminal = require('./terminal.coffee') # SETTINGS app.listen(9293) -term = terminal.new(105, 66) +term = terminal.new(104, 66) sockets = [] @@ -46,7 +49,7 @@ io.sockets.on 'connection', (socket) -> sockets.splice i, 1 return - socket.emit 'init', width: term.width, height: term.height, x: term.x, y: term.y, a: term.a, text: term.text, attributes: term.attributes + socket.emit 'init', width: term.width, height: term.height, x: term.x, y: term.y, a: term.a, text: term.text, attributes: term.attributes, cursor_visible: term.cursor_visible, scroll_top: term.scroll_top, scroll_bottom: term.scroll_bottom process.stdin.resume() process.stdin.setEncoding 'utf8'