Enumerating Active Sessions

57 views
Skip to first unread message

C. Mundi

unread,
Apr 26, 2012, 4:14:21 PM4/26/12
to expre...@googlegroups.com

Sorry if this is an RTFM.  I am using express with in-memory sessions (yes, shame on me).  I would like to know what Express data structure I need to peek into to find out what sessions are active.  I want to do the usual things like indicate when a a user is logged in, how many guests are logged in, etc.

Thanks!

tjholowaychuk

unread,
Apr 26, 2012, 8:29:50 PM4/26/12
to expre...@googlegroups.com
there used to be some methods for enumeration on the memory Store.prototype, but not
all stores have the same capabilities so I removed that a long time ago. It's easy to invest
in a small middleware using redis to mask off active users etc though, IMO that's a better
approach than talking to the session store directly

C. Mundi

unread,
Apr 26, 2012, 10:38:42 PM4/26/12
to expre...@googlegroups.com

Ok, thanks.  I'm already using sqlite and have a clean path to moving to mongo, so I will hold off rather than add redis to the mix.  Thanks for your reply, it saves me time.

--
You received this message because you are subscribed to the Google Groups "Express" group.
To view this discussion on the web visit https://groups.google.com/d/msg/express-js/-/bLRwo-Kna-4J.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.

tjholowaychuk

unread,
Apr 27, 2012, 12:33:25 PM4/27/12
to expre...@googlegroups.com
cool, yeah you could do it with sqlite easily too
To unsubscribe from this group, send email to express-js+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages