Answer the question
In order to leave comments, you need to log in
There is an example of a chat. But he doesn't want to work?
uditalias.github.io/chat-nodejs
There is an example of a chat on Node.js + Socket.IO
But for some reason it does not work!
Can anyone come across?
Answer the question
In order to leave comments, you need to log in
This example is extremely outdated and written rather crookedly.
Firstly public/scripts/chat.io.js
, the server address is incorrectly specified, it should be localhost:8080
instead of localhost
.
Secondly, some old unknown version of socket.io was used , you need to pick it up. This can be seen from line 42 server.js
, where the xhr-polling
transport is used instead of the current one polling
.
If you want to make it work, fix the server address, don't touch server.js and start sorting through the major versions of socket.io until you find the one for which it was made (the repository was updated in January 2013, you need to look in that neighborhood).
But I wouldn't bother with an example that doesn't even have a package.json.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question