On my website, I have different different pages, each page has javascript that contains
var socket = io.connect('http://localhost:8888');
On the app.js (server file), it's coded so that everytime it receives a connection, it'll do something, no matter which page the client is from.
io.sockets.on ('connection', function (socket) {
// do something
});
However, I'd like the app.js to execute different action depending on the page client is from, is that possible?
Thanks!