Node.js find out visitors entry page, current page and exit page?

I've written a small server in Node with socket.io, and i want to find out the entry, current and exit -pages. My idea is to store then inside of the user session for later use.

My problem is that i do not know where to get this info, does anyone know?

I think you're looking for something like this.

node-sessions

The entry page can be taken from Referer HTTP header (if present).

The current page is request.url

The exit page should be got inside browser when changing the window.location