New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

egg-session-redis

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-session-redis

redis store for egg session

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
1
Created
Source

egg-session-redis

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

A session extension for store session in redis.

Install

$ npm 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
exports.sessionRedis = {
  enable: true,
  package: 'egg-session-redis',
};

exports.redis = {
  enable: true,
  package: 'egg-redis',
};

Configuration

If we only have one redis instance:

// {app_root}/config/config.default.js
exports.redis = {
  client: {
    host: 'your redis host',
    port: 'your redis port',
    password: '',
    db: '0',
  },
  agent:true
};
// no 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

exports.redis = {
  clients: {
    session: { /* config */ },
    cache: { /* config */ },
  },
};

exports.sessionRedis = {
  name: 'session', // specific instance `session` as the session store
};

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

egg

FAQs

Package last updated on 10 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts