You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
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.2
Source
npmnpm
Version published
Weekly downloads
4
-60%
Maintainers
1
Weekly downloads
 
Created
Source

mongoose-session

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 parameters.

  • options.ttl : allowed time of inactivity before a session is destroyed, in seconds (3600)

Info

This works perfectly for my current use in projects, and requires no configuration. If your usage of mongoose-session would require any extra configuration to work properly, feel free to submit an issue or pull request, and I'll look over it and make any changes needed to be made for this to work for everyone. :)

FAQs

Package last updated on 10 Sep 2014

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