On button click, the message 'door' should appear on the console but it isn't.
Client code :
<button type="button" onClick = "doorClicked()">Door</button>
function doorClicked(){
socket.emit('door', function(data){
socket.send("Door");
});
}
Server side :
io.sockets.on('connection', function(socket){
socket.on('door', function(data){
console.log('Door');
});
}