{"repo":"expressjs/session","free":true,"listed":false,"github":"https://github.com/expressjs/session","clone":"git clone https://github.com/expressjs/session.git","description":"Simple session middleware for Express","language":"JavaScript","stars":6358,"topics":["javascript","nodejs","expressjs","middleware","session"],"license":"MIT","category":"dev-tools","readme_excerpt":"express-session [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][node-url] [![Build Status][ci-image]][ci-url] [![Test Coverage][coveralls-image]][coveralls-url] Installation This is a Node.js module available through the npm registry. Installation is done using the npm install command: API session(options) Create a session middleware with the given options . Note Session data is not saved in the cookie itself, just the session ID. Session data is stored server-side. Note 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 . Warning 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. For a list of stores, see compatible session stores. Options express-session accepts these properties in the options object. cookie Settings object for the session ID cookie. The default value is { path: '/', httpOnly: true, secure: false, maxAge: null } . In addition to providing a static object, you can also pass a callback function to dynamically generate the cookie options for each request. The callback receives the req object as its argument and should retu","default_branch":null,"files":null,"tree":[],"storefront":"/r/expressjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/expressjs/session/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}