Session — Techniques · NestJS

Keep each visitor's data on the server behind a signed session cookie: count visits, remember the cats they looked at, and forget them on request, with express-session and @Session().

What you will learn

Read the theory for Session

All Techniques lessons

All NestJS courses

loading types…

What you'll learn

  • Register express-session with a secret and explain resave, saveUninitialized and the memory store's limits
  • Read and write a visitor's session from a handler with @Session(), and know when the cookie is set
  • Destroy a session, and place session middleware in the request pipeline relative to guards