V
V
Vladimir2020-06-24 06:25:14
JavaScript
Vladimir, 2020-06-24 06:25:14

How do sessions work under the hood?

Good morning. Can you please tell me if there is a step-by-step guide for writing the same express-session from scratch? Is body-parser required and is it worth it for me to go here at all? Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Robur, 2020-06-24
@HistoryART

there are only 4 files of 100-150 lines each (half jsdoc). Why do you need a manual when you can just pop in and see? There are comments, the principle is very simple.
https://github.com/expressjs/session/tree/master/s...

A
alex4answ, 2020-06-24
@alex4answ

In fact, if you use the standard MemoryStore, then this is an object pool, where the session id (from the cookie) is the key to the session object in the Store
. In short, everything is stored in the object.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question