client not handshaken on computers outside the network

21 views
Skip to first unread message

Wern Ancheta

unread,
Mar 28, 2012, 2:59:49 AM3/28/12
to nowjs
I'm trying to make now.js accessible on computers outside my home
network via my external ip address. I've already setup the router for
port forwarding to the ports that I have used. 8080 for php, 8081 for
node.js

I have this on the back-end JavaScript file(chatserver.js)
server.listen(8081, "0.0.0.0");

I've also modified this line in the nowjs.js file into my external ip
but still doesn't work.
window.now = nowInitialize("//localhost:8081", {});

I'm trying out the chat server example from the site. It works fine
when I access it via localhost and via my external ip on my laptop.
But when somebody accesses it from the outside, they can still access
the page but is unable to handshake. Where could the problem be?

Thanks in advance!

Ian Serlin

unread,
Mar 29, 2012, 3:37:28 AM3/29/12
to no...@googlegroups.com
Hey Wern,

Just a few thoughts:

a) window.now = nowInitialize("//localhost:8081", {}); will only work on your computer, I think you mentioned you were doing this, but you'll need to change "localhost" in this line to be your actual public facing ip
b) your operating system's firewall could be preventing incoming connections. On OS X this setting is in System Preferences > Security & Privacy > Firewall
c) you could try changing server.listen(8081, "0.0.0.0"); to just server.listen(8081);

HTH
Reply all
Reply to author
Forward
0 new messages