V
V
Vasya Pupkin2015-04-01 23:35:13
JavaScript
Vasya Pupkin, 2015-04-01 23:35:13

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

2 answer(s)
A
Alexander Rulev, 2015-04-02
@Rulexec

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:8080instead 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-pollingtransport 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.

O
olamedia., 2015-04-01
@w999d

GET gameralabs.com:8080/socket.io/socket.io.js net::ERR_CONNECTION_REFUSED
the library in the example is not connected - the link is broken

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question