expressjs/session

update Readme to include details on extending Store implementation from store.js

Open

#349 ouverte le 30 août 2016

Voir sur GitHub
 (4 commentaires) (2 réactions) (0 assignés)JavaScript (977 forks)batch import
docshelp wanted

Métriques du dépôt

Stars
 (6 073 stars)
Métriques de merge PR
 (Merge moyen 8j) (2 PRs mergées en 30 j)

Description

As noted in a comment on #97, developers who want to write a Store implementation either need to:

  1. extend their Store from express-session's store.js, which typically means requiring express-session as a dependency
  2. implement their own version of the functionality in store.js, session.js, and cookie.js (or copy the files from express-session)

This is because express-session requires the following methods on the Store in order to work:

  • regenerate()
  • load()
  • createSession()

These are available in store.js, but createSession itself requires both session.js and cookie.js.

The documentation should be updated to provide guidance on these facts.

Guide contributeur