Skip to content

Commit

Permalink
debugging on heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
Orlayhemmy committed May 24, 2018
1 parent 85c16fc commit 35d7fd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/socket/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module.exports = function (io) {
};
onlineUsers.push(user);
io.sockets.emit('people', onlineUsers)
console.log(onlineUsers)
});

socket.on('showOnlineUsers', () => {
Expand Down Expand Up @@ -100,6 +101,7 @@ module.exports = function (io) {
});
}
}
console.log(data, 'invite sent');
});

socket.on('joinGame', (data) => {
Expand Down Expand Up @@ -134,12 +136,10 @@ module.exports = function (io) {
});

socket.on('leaveGame', (data) => {
io.sockets.emit('connectedUsers', (data));
exitGame(socket);
});

socket.on('disconnect', () => {
io.sockets.emit('connectedUsers', (data));
exitGame(socket);
});

Expand Down
2 changes: 2 additions & 0 deletions public/js/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,13 @@ angular.module('mean.system').controller('IndexController', [
user: selectedUser
};
socket.emit('invitePlayer', messageData);
console.log('invite sent')
}
};

socket.on('invitation', message => {
messageArray.push(message);
console.log(message)
$scope.notifications = messageArray;
$scope.messageLength = messageArray.length;
});
Expand Down

0 comments on commit 35d7fd2

Please sign in to comment.