Add public folder
This commit is contained in:
16
public/linker/js/services/socket.js
Normal file
16
public/linker/js/services/socket.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
});
|
||||
Reference in New Issue
Block a user