Question

I'm noob on nodejs and i'm trying some tutorials of nodejs. I'm trying this tutorial: http://cestfait.ch/content/chat-webapp-nodejs it works wonderful on my localhost but not when I upload to appfog like you can see here: http://nodebruno.hp.af.cm/

For example, the prompt don't show up. I changed the code to avoid the prompt and insert the nickname on a input text and this work on localhost but doesn't work on appfog too.

I already tried on nodejitsu servers and I have the same problem

Can you help me ?

Était-ce utile?

La solution

Your app has an error, it's trying to connect to a localhost socket.io server.

You need to change this line:

var socket = io.connect('http://localhost:8000'); 

to

var socket = io.connect();

And it would work preferably on Nodejitsu

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top