Languages
[Edit]
EN

Express.js - get current session id

3 points
Created by:
Laylah-Walsh
624

In this article, we would like to show you how to get current session id using Express.js.

Quick solution:

or:

 

Practical example

Edit

In this example, we present how to get current session id using req.session.id and send it as a response of the HTTP GET request.

 

References

Edit
  1. GitHub - expressjs/session: Simple session middleware for Express

Alternative titles

  1. Express.js - getting current session id (from connect.sid cookie value)
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join