metamaps--metamaps/app/assets/javascripts/realtime.js.coffee

6 lines
No EOL
205 B
CoffeeScript

window.app.realtime =
connect : () ->
window.app.socket = io.connect('http://localhost:5001');
window.app.socket.on 'connect', () ->
subscribeToRooms()
console.log('socket connected')