Reputation: 5046
I have an Express.js application and I would like to keep a log of all the sessions by the users. This has created a bit of trouble while implementing the Logout feature. The accepted practice is to use session.destroy
but I do not want to do this since it deletes the session from the database. Is it possible to expire the session without destroying it?
Upvotes: 1
Views: 332
Reputation: 13529
Why don't you use some key in the session. For example:
req.session.date = "...";
Upvotes: 1