You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how this works, but when I tried to reproduce this code, it didn't work.
I believe it's because socket.io is listening to Server(app), while it should listen to $server, which is what the server returns.
So I believe, the line 'var io = require('socket.io')(http)' should be moved after '$server = app.listen(3000, ...)', and should be modified to be 'var io = require('socket.io')(server)'
The text was updated successfully, but these errors were encountered:
I'm not sure how this works, but when I tried to reproduce this code, it didn't work.
I believe it's because socket.io is listening to Server(app), while it should listen to $server, which is what the server returns.
So I believe, the line 'var io = require('socket.io')(http)' should be moved after '$server = app.listen(3000, ...)', and should be modified to be 'var io = require('socket.io')(server)'
The text was updated successfully, but these errors were encountered: