eggjs/egg-session-redis

Name: egg-session-redis

Owner: egg

Description: redis store for egg session

Created: 2017-03-01 02:48:20.0

Updated: 2018-04-26 06:58:43.0

Pushed: 2017-09-05 01:29:27.0

Homepage: null

Size: 7

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

egg-session-redis

NPM version build status Test coverage David deps Known Vulnerabilities npm download

A session extension for store session in redis.

Install
m i egg-session-redis egg-redis --save
Usage

This module dependent on egg-redis plugin, so we must enable both.

app_root}/config/plugin.js
rts.sessionRedis = {
able: true,
ckage: 'egg-session-redis',


rts.redis = {
able: true,
ckage: 'egg-redis',

Configuration

If we only have one redis instance:

app_root}/config/config.default.js
rts.redis = {
ient: {
host: 'your redis host',
port: 'your redis port',
password: '',
db: '0',

ent:true

o need to set any sessionRedis config

If we have more than one redis instance, we need to configure which instance to be used as session store.

app_root}/config/config.default.js

rts.redis = {
ients: {
session: { /* config */ },
cache: { /* config */ },



rts.sessionRedis = {
me: 'session', // specific instance `session` as the session store

Questions & Suggestions

Please open an issue here.

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.