ndx-socket
ndx-framework
websockets forinstall with
npm install --sve ndx-socket
what it does
ndx-socket provides callbacks for socket connection and disconnect
example
src/server/app.coffee
require 'ndx-server'
.config
database: 'db'
.use 'ndx-socket'
.controller (ndx) ->
sockets = []
ndx.socket.on 'connection', (socket) ->
#do something with the socket
sockets.push socket
ndx.socket.on 'disconnect', (socket) ->
#socket has disconnected
sockets.splice sockets.indexOf(socket), 1