node.js - socket io not found - 404 -


i ran error when following tutorial creating chat service. here code: (most of automatically generated)

var port = normalizeport(process.env.port || '3000'); app.set('port', port);  /**  * create http server.  */  var server = http.createserver(app);  /**  * listen on provided port, on network interfaces.  */  var io = require('socket.io').listen(app.listen(port)); io.sockets.on('connection', function (socket) {     socket.emit('message', { message: 'welcome chat' });     socket.on('send', function (data) {         io.sockets.emit('message', data);     }); }); 

client side:

script(src='/javascripts/chat.js') script(src='/socket.io/socket.io.js') 

do have manually put socket.io.js folder? don't it...


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -