I'm going to try to ask this as simply as I can:
<script src="http://127.0.0.1:8080/socket.io/socket.io.js"></script>
is to local host as
<script src="http://????????/socket.io/socket.io.js"></script>
is to nginx?
Worked on local host as well as production while the ip address and port were hard coded (before I added a domain name and nginx on digital ocean). I am only using nginx as a reverse-proxy for an apache server. This is the node server.js file ran at start up.
var PORT = 8080;
var mongo = require('mongodb').MongoClient,
ioClient = require('socket.io').listen(PORT)
;