{
  "author": {
    "name": "adrai"
  },
  "name": "sessionstore",
  "version": "1.0.5",
  "private": false,
  "main": "index.js",
  "engines": {
    "node": ">=0.8.0"
  },
  "directories": {
    "lib": "./lib"
  },
  "dependencies": {
    "async": "0.9.0",
    "jsondate": "0.0.1",
    "lodash": "2.4.1",
    "tolerance": "1.0.0"
  },
  "devDependencies": {
    "cradle": ">=0.2.7",
    "expect.js": ">= 0.1.2",
    "express": ">= 2.5.0",
    "express-session": ">= 1.0.0",
    "memjs": ">= 0.8.4",
    "mocha": ">= 1.0.1",
    "mongodb": ">= 0.0.1",
    "redis": ">= 0.10.1",
    "tingodb": ">= 0.0.1"
  },
  "description": "Sessionstore is a node.js module for multiple databases. It can be very useful if you work with express or connect.",
  "keywords": [
    "express",
    "session",
    "connect",
    "orm",
    "mongodb",
    "couchdb",
    "tingodb",
    "redis",
    "memory",
    "database",
    "host"
  ],
  "homepage": "https://github.com/adrai/sessionstore",
  "repository": {
    "type": "git",
    "url": "git@github.com:adrai/sessionstore.git"
  },
  "bugs": {
    "url": "https://github.com/adrai/sessionstore/issues"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "https://raw.github.com/adrai/sessionstore/master/licence"
    }
  ],
  "scripts": {
    "test": "mocha"
  },
  "readme": "# Introduction\n\n[![travis](https://img.shields.io/travis/adrai/sessionstore.svg)](https://travis-ci.org/adrai/sessionstore) [![npm](https://img.shields.io/npm/v/sessionstore.svg)](https://npmjs.org/package/sessionstore)\n\nSessionstore is a node.js module for multiple databases. It can be very useful if you work with express or connect.\n\n# Installation\n\n    $ npm install sessionstore\n\n# Usage\n\n## Connecting to in-memory\n\n\tvar sessionstore = require('sessionstore');\n\n    var express = require('express');\n    var app = express();\n\n    app.use(express.session({\n        store: sessionstore.createSessionStore()\n    }));\n\n## Connecting to mongodb\n\n    var sessionstore = require('sessionstore');\n\n    var express = require('express');\n    var app = express();\n\n    app.use(express.session({\n        store: sessionstore.createSessionStore({\n            type: 'mongodb',\n            host: 'localhost',         // optional\n            port: 27017,               // optional\n            dbName: 'sessionDb',       // optional\n            collectionName: 'sessions',// optional\n            reapInterval: 600000,      // optional\n            maxAge: 1000 * 60 * 60 * 2,// optional\n            timeout: 10000             // optional\n        })\n    }));\n\n## Connecting to tingodb\n\n    var sessionstore = require('sessionstore');\n\n    var express = require('express');\n    var app = express();\n\n    app.use(express.session({\n        store: sessionstore.createSessionStore({\n            type: 'tingodb',\n            dbPath: __dirname + '/',   // optional\n            collectionName: 'sessions',// optional\n            reapInterval: 600000,      // optional\n            maxAge: 1000 * 60 * 60 * 2,// optional\n            timeout: 10000             // optional\n        })\n    }));\n\n## Connecting to couchdb\n\n    var sessionstore = require('sessionstore');\n\n    var express = require('express');\n    var app = express();\n\n    app.use(express.session({\n        store: sessionstore.createSessionStore({\n            type: 'couchdb',\n            host: 'http://localhost',  // optional\n            port: 5984,                // optional\n            dbName: 'express-sessions',// optional\n            collectionName: 'sessions',// optional\n            timeout: 10000             // optional\n        })\n    }));\n\n## Connecting to redis\n\n    var sessionstore = require('sessionstore');\n\n    var express = require('express');\n    var app = express();\n\n    app.use(express.session({\n        store: sessionstore.createSessionStore({\n            type: 'redis',\n            host: 'localhost',         // optional\n            port: 6379,                // optional\n            prefix: 'sess',            // optional\n            ttl: 804600,               // optional\n            timeout: 10000             // optional\n        })\n    }));\n\n## Connecting to memcached\n\n    var sessionstore = require('sessionstore');\n\n    var express = require('express');\n    var app = express();\n\n    app.use(express.session({\n        store: sessionstore.createSessionStore({\n            type: 'memcached',\n            host: 'localhost',         // optional\n            port: 11211,               // optional\n            prefix: 'sess',            // optional\n            expires: 80,               // optional\n            retries: 2,                // optional\n            failover: false,           // optional\n            failoverTime: 60,          // optional\n            timeout: 10000             // optional\n        })\n    }));\n\n## Catch connect ad disconnect events\n\n    var ss = sessionstore.createSessionStore({ type: 'mongodb' }, function(err, ss) {\n        console.log('hello from callback');\n        // use store here...\n        // app.use(express.session({\n        //     store: ss\n        // }));\n    });\n    ss.on('connect', function() {\n        console.log('hello from event');\n        // or here\n        // app.use(express.session({\n        //     store: ss\n        // }));\n    });\n    ss.on('disconnect', function() {\n        console.log('bye');\n    });\n\n#[Release notes](https://github.com/adrai/sessionstore/blob/master/releasenotes.md)\n\n# Database Support\nCurrently these databases are supported:\n\n1. inmemory\n2. mongodb ([node-mongodb-native] (https://github.com/mongodb/node-mongodb-native))\n3. couchdb ([cradle] (https://github.com/cloudhead/cradle))\n4. tingodb ([tingodb] (https://github.com/sergeyksv/tingodb))\n5. redis ([redis] (https://github.com/mranney/node_redis))\n6. memcached ([memjs] (https://github.com/alevy/memjs))\n\n\n# License\n\nCopyright (c) 2014 Adriano Raiano\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n",
  "readmeFilename": "README.md",
  "_id": "sessionstore@1.0.5",
  "_shasum": "d93262332fed2736d0744a2f4e7a295a17aff85d",
  "_from": "sessionstore@",
  "_resolved": "https://registry.npmjs.org/sessionstore/-/sessionstore-1.0.5.tgz"
}
