Node.js and socket.io don't work on Cloud9 IDE
Does anyone has experience to have Node.js and socket.io working on Cloud9 IDE? The "Example (NodeJS with Socket.io)" (at https://c9.io/site/blog/2013/05/native-websockets-support/ ) doesn't work. First, the server ( https://c9.io/etlolap/webapp , /test.js) throws an error unless I fix as follow. I clicked Run button while test.js is on active tab. var socketIo = require('socket.io'), io = socketIo.listen(Number(process.env.PORT)); io.sockets.on('connection', function (socket) { socket.emit('news', { hello: 'world' }); socket.on('my other event', function (data) { console.log(data); }); });