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. based on `connect-mongo`

  • 2.0.0
  • 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.

see Chinese version: 中文

Install

$ npm i egg-session-mongo --save

Usage

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

or you can overwrite you MongoStore options in app.js.

// {app_root}/app.js
module.exports = app => {
  const MongoStore = require('egg-session-mongo')(app);

  app.beforeStart(async () => {
    app.sessionStore = new MongStore(/* options */);
  });
};

see app.js for more detail.

Configuration

// {app_root}/config/config.default.js
exports.sessionMongo = {
  url: 'mongodb://127.0.0.1/test'
};

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

Questions & Suggestions

Please open an issue here. or open an issue just at this repo's issue for more timely reply

License

MIT

Keywords

FAQs

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