1.1.4 • Published 3 years ago

think-session-redis v1.1.4

Weekly downloads
48
License
-
Repository
github
Last release
3 years ago

think-session-redis

Use Redis to store session for ThinkJS

Build Status Coverage Status npm

Install

npm install think-session-redis

How to use

config file src/config/adapter.js, add options:

const redisSession = require('think-session-redis');
exports.session = {
  type: 'redis',
  common: {
    cookie: {
      name: 'thinkjs',
      //maxAge: '',
      //expires: '',
      path: '/',  //a string indicating the path of the cookie
      //domain: '',
      //secure: false,
      //keys: [],
      httpOnly: true,
      sameSite: false,
      signed: false,
      overwrite: false
    }
  },
  redis: {
    handle: redisSession,
    maxAge: 3600 * 1000, //session timeout, if not set, session will be persistent.
    autoUpdate: false, //update expired time when get session, default is false
  }
}
1.1.4

3 years ago

1.1.3

4 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago