I recently hosted my first Node app using Express and socket.io on Heroku and need to find the client's IP address. So far I've tried socket.manager.handshaken[socket.id].address
, socket.handshake.address
and socket.connection.address
, neither of which give the correct address.
App: http://nes-chat.herokuapp.com/ (also contains a link to GitHub repo)
To view IPs of connected users: http://nes-chat.herokuapp.com/users
Anyone know what the problem is?