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

mongoose-session

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

mongoose-session

Express 4 Middleware for MongoDB Session Storage using the Mongoose ODM

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 02 May 2015

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