GianlucaGuarini/nodejs-push-notification-server

** SOLVED ** works on localhost but not from another machine on network

Closed this issue · 1 comments

AWESOME code you have here... have been playing around with it and figuring out how it uses socket.io...

It works GREAT using localhost:8000 (and any other available port I test it with).... but on another computer running on local network, I get the initial view (where it loads the original XML) but after I change the xml NOTHING updates at all, while on localhost it DOES continue to update.

Any idea what causes this behavior and if theres a workaround / fix I can implement?

note: looking at the console in chrome I see that the polling attempt responds with "net::ERR_CONNECTION_REFUSED".... so is socket.io the issue perhaps?

Thanks

** SOLVED **

Well, problem seems solved by changing the following line:
var socket = io.connect('http://localhost:8000');

to...
var socket = io.connect();

Now across local network all my machines using either local host OR the ip address gets updates!