mongoose-session

Express 4 Middleware for MongoDB Session Storage using the Mongoose ODM

mongoose-session is insecure and inactive. Please use connect-mongo instead.
Last updated 5 years ago by chncdcksn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mongoose-session 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.0.4                                ...           latest (5 years ago)

4 Versions

  • 0.0.4 [deprecated]           ...           5 years ago
  • 0.0.3 [deprecated]           ...           5 years ago
  • 0.0.2 [deprecated]           ...           5 years ago
  • 0.0.1 [deprecated]           ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 16
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |