Files
lunchrun.me/www/linker/js/services/socket.js
2014-03-22 20:21:21 -05:00

17 lines
425 B
JavaScript

var lunchServices, socketFactory;
lunchServices = angular.module('lunchServices', []);
lunchServices.factory('socket', socketFactory = function() {
var s;
s = window.io.connect();
s.on('connect', function() {
console.log('connected with socket!');
return s.on('message', function(message) {
console.log('New comet message received :: ');
return console.log(message);
});
});
return s;
});