November 2013
Intermediate to advanced
148 pages
3h 12m
English
Whenever you have a user-facing web application, you’ll almost always use sessions. A session is data that’s attached to a particular user. As the user browses pages on the site or uses the web application, the server keeps track of the user through a session cookie. On each request, the server reads the cookie, retrieves the session data, then uses it when generating a response.
Exactly where you store this session data is up to you. By default, Express will keep the data in memory, but this doesn’t readily scale. Once you have more than one Node.js process, the session data should really be stored to be in a shared place. That way, no matter which process services a user’s request, it will have the correct ...
Read now
Unlock full access