Closed johndevor closed 13 years ago
Do you have any console.log output from the browser?
Nothing. Just looks like this.
I believe I am on the correct port and the correct URL, but the server isn't talking. Here's a picture of terminal.
I know that if you don't run node as a root user and you're trying to use Socket.io it wont have the permissions to open the port.
does running sudo node ... help ?
--Adam
Chrome 13 uses the new handshake authorization for websockets "hybi-10" - that might have something to do with it as well, as I don't think Socket.io has upgraded yet... but i think they're working on it?
Still no luck.
$ sudo node js/DemoCircles/server.js
Password:
10 Aug 17:39:48 - socket.io ready - accepting connections
But still neither Safari nor Chrome can connect to it... they both just spin.
No data received
Unable to load the webpage because the server sent no data.
Here are some suggestions:
Reload this webpage later.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
This is very odd. I just tried in on my OS X Lion with node v0.4.7 (a little outdated but I dont think this should matter so much). You should be able to load the HTML page without node starting so something seems odd to me that you aren't able to show the base HTML. Does the page load if you do not run node? Also what version of node are you using and how did you build it?
Ok, I got it to work. Though I had to put it in my Sites folder and navigate to this address:
http://192.168.1.105/~john/RealtimeMultiplayerNodejs/DemoCircles.html
Any idea how to avoid having to have it in the sites folder?
In order to access the demo, it needs to be running from a webserver. This is why putting it in your 'Sites' folder works, because now your browser can reach those pages.
Looking at it now, i notice you tried to reach localhost:8081 - I hadn't noticed it before. That won't work, because node.js is not going to serve the files to you.
Try using MAMP - it's free and pretty powerful
Ah great. Still getting used to Node / javascript... I'm too used to python / django / apache!
Thanks for the help!
I'm trying to follow the simple 3-step instructions, but I'm running into some trouble.
The server starts and outputs the normal message:
But when I try to load the demo (in Safari or Chrome), nothing happens. The browser appears to connect (as the loading spinner runs until I ctrl-c the server), but no more console output appears, and nothing appears in the browser(s).
I've tried connecting to a variety of URLs (I'm assuming the default port of 8081 is correct):
Any help? Am I missing any dependencies?