Socket
Socket
Sign inDemoInstall

mongoose-session

Package Overview
Dependencies
17
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mongoose-session

Express 4 Middleware for MongoDB Session Storage using the Mongoose ODM


Version published
Weekly downloads
21
increased by31.25%
Maintainers
1
Install size
217 kB
Created
Weekly downloads
 

Readme

Source

mongoose-session

INACTIVE. Use connect-mongo instead. It's better anyways.

Express 4 Middleware for MongoDB Session Storage using the Mongoose ODM

Installation

npm install mongoose-session

Usage

var express = require('express');

var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/db');

var app = express();

app.use(require('express-session')({
    key: 'session',
    secret: 'SUPER SECRET SECRET',
    store: require('mongoose-session')(mongoose)
}));

Options

mongoose-session accepts options as a second parameter.

  • options.ttl : allowed time of inactivity before a session is destroyed, in seconds (3600)
  • options.modelName : specifies the name of the collection, defaults to 'Session'

Info

I am no longer actively working on this project, and this project SHOULD NOT be considered ready for production in any way, shape, or form. It is recommended that you use connect-mongo (GitHub|NPM) instead. If anyone wants to take over this project, feel free to email me.

FAQs

Last updated on 02 May 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc