Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (17 sloc) 0.481 kB
http = require 'http'
sockjs = require 'sockjs'
sock = sockjs.createServer
log: (severity, line) ->
line = line.split ' '
if line[0] != 'SockJS'
status = line.pop()
time = line.pop()
line.push status
line.push time
console.log line.join(' ')
sock.on 'connection', (conn) ->
conn.on 'data', (message) ->
conn.write(message)
conn.on 'close', -> return
module.exports = ->
sock.installHandlers @, {prefix: '/sock'}
Jump to Line
Something went wrong with that request. Please try again.