node icon indicating copy to clipboard operation
node copied to clipboard

Feature Request: session event hooks

Open RobiFerentz opened this issue 11 years ago • 6 comments

Please please PLEASE add event hooks for session start, session end and anything else you can think of that happens on the session scope.

RobiFerentz avatar Dec 23 '14 09:12 RobiFerentz

I don't understand what you mean. What session scope?

bnoordhuis avatar Dec 23 '14 12:12 bnoordhuis

Other server side languages have session events you can use like session_start, session_end etc. It would be nice to have in node/io too. Expressjs does not supply such events as far as I know. You can set up some session data, but you can't really do anything complex there.

RobiFerentz avatar Dec 23 '14 12:12 RobiFerentz

Core doesn't have a concept of sessions, that's left to higher-level frameworks like express, hapi, loopback, etc. Core only deals with requests and connections. Sorry, I'm going to close this issue; it's out of scope, no pun intended.

bnoordhuis avatar Dec 23 '14 12:12 bnoordhuis

Well, then it's pretty crappy that none of them seem to actually have this functionality as far as I know.

RobiFerentz avatar Dec 23 '14 12:12 RobiFerentz

This could even be better implemented as extension for those mentioned frameworks or as a custom module if really needed.

On 7:31AM, Tue, Dec 23, 2014 Robert Ferentz [email protected] wrote:

Well, then it's pretty crappy that none of them seem to actually have this functionality as far as I know.

— Reply to this email directly or view it on GitHub https://github.com/iojs/io.js/issues/200#issuecomment-67946605.

jakubkeller avatar Dec 23 '14 13:12 jakubkeller

Yeah. Should actually be trivial to implement in express, depending on what you mean by session end, though.

aredridel avatar Dec 23 '14 15:12 aredridel