server_test.js 201 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 var io = require('socket.io').listen(3000); io.on('connection', function(socket){ console.log('connect'); var instanceId = socket.id; socket.on('alert', function(data){ console.log(data); }) })