This is a Node.js module available through the npm registry. Installation is done using the npm install command provided in the instructions. Create a session middleware with the given options. Session data is not saved in the cookie itself, just the session ID. Session data is stored server-side. Since version 1.5.0, the cookie-parser middleware no longer needs to be used for this module to work. This module now directly reads and writes cookies on req/res. Using cookie-parser may result in issues if the secret is not the same between this module and cookie-parser. The default server-side session storage, MemoryStore, is purposely not designed for a production environment. It will leak memory under most conditions, does not scale past a single process, and is meant for debugging and developing.

Features

  • Session data is stored server-side
  • Express-session accepts properties in the options object
  • If both expires and maxAge are set in the options, then the last one defined in the object is what is used
  • The expires option should not be set directly; instead only use the maxAge option
  • If both expires and maxAge are set in the options, then the last one defined in the object is what is used
  • A Node.js module available through the npm registry

Project Samples

Project Activity

See All Activity >

Categories

Build Tools

License

MIT License

Follow express-session

express-session Web Site

Other Useful Business Software
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of express-session!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript Build Tools

Registered

2021-09-24