0

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 ?

Tiago Araújo
  • 13
  • 1
  • 4

1 Answers1

1

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

Julián Duque
  • 9,407
  • 1
  • 21
  • 16
  • Now the prompt show up but nothing work. Don't appear "nickname" connected. And the server take some seconds to show the prompt box – Tiago Araújo Jan 22 '13 at 12:18