Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-session-mongo

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-session-mongo

mongodb store for egg session

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

egg-session-mongo

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

A session extension for store session in MongoDB.

Install

$ cd /path/to/your/project/node_modules && git clone --depth 1 https://github.com/Mitscherlich/egg-session-mongo

Usage

// {app_root}/config/plugin.js
exports.sessionMongo = {
  enable: true,
  package: 'egg-session-mongo',
};

Configuration

/**
 * egg-session-mongo default config
 * @member Config#sessionMongo
 * @property {string}   [url='mongodb://127.0.0.1/test']  - MongoDB server url
 * @property {string}   [collection='sessions']           - Session store collection name
 * @property {Object}   [mongooseConnection]              - Re-use existing or upcoming mongoose connection
 * @property {number}   [ttl=1209600]                     - Session expire time
 */
exports.sessionMongo = {
  url: 'mongodb://127.0.0.1/test',
  collection: 'sessions',
  mongooseConnection: null, // uncomment this to re-use existing or upcoming mongoose connection
  ttl: 14 * 24 * 60 * 60, // = 14 days. Default
};

see config/config.default.js for more detail.

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

FAQs

Package last updated on 03 Mar 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc