Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

368
Views
How can i access all the session stored on the server?

I am trying to understand sessions. I know their purpose and i know that they are saved on the server. Now, i'd like to "see" them so i can see what informations they contain. Is there a way to access the sessions on the server as i can see the cookies with a browser ?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Assuming you're using express-session, you look in req.session on an incoming request for a particular user. You put something into a session by assigning properties to req.session on an incoming request. And, then on future requests whatever data on put in the session will be in req.session on future requests.

If you want to just examine everything in the session store, then you have to go to the interface for whatever session store you're using and use that. If you haven't selected a specific session store when configuring express-sesssion, then it's using the memoryStore.

To have general access to the session store, you'd have to create your own session store, save it somewhere and then provide it to the express-session initialization options.

Within a given request req.sessionStore is the active session store object which has an interface documented in the express-session doc. But, inside a specific request, you would usually just access req.session to access the current user's session data.

If you want to know more about how any of the dozens of supported session stores work, you'd have to console their doc/code.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!