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

express-session-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-session-mongodb - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "express-session-mongodb",
"version": "1.0.0",
"version": "1.0.1",
"description": "Session Store for express-session",

@@ -5,0 +5,0 @@ "keywords": [

@@ -21,2 +21,15 @@ ExpressSessionMongoDB

Installation
============
npm install express-session-mongodb
Running Tests
=============
In the directory where the module is located, run the following 2 commands on the prompt:
- npm install
- npm test
Usage

@@ -49,12 +62,12 @@ =====

```javascript
function(<DBHandle>, <Callback>, <Options>);
```
<DBHandle> is the database handle that the store will operate on. It should be obtained using the MongoDB driver.
<Callback> is the function that will be called when the session store instance (and its underlying database collection/index dependencies) have been created.
<Options> are the options you can pass to the session store instance.
'DBHandle' is the database handle that the store will operate on. It should be obtained using the MongoDB driver.
'Callback' is the function that will be called when the session store instance (and its underlying database collection/index dependencies) have been created.
'Options' are the options you can pass to the session store instance.
<Callback> takes the following signature: function(<Err>, <StoreInstance>), where <Err> is null if no error occured (otherwise it contains the error object) and <StoreInstance> is the resulting store instance you can pass to express-session.
'Options' is an object with the following properties:
<Options> is an object with the following properties:
SessionID: Can be either true or false (default). If true, session IDs will be indexed with a unique requirement in the MongoDB database, making the creation of sessions slower, but their access faster. It will also report an error if 2 sessions with duplicate IDs are generated.

@@ -64,2 +77,12 @@ TimeToLive: Integer than can be 0 (default) or greater. If greater than 0, a Time-to-Live index will be set which will represent how long (in seconds) a session can be idle in the database (neither written to nor accessed) before MongoDB deletes it.

'Callback' takes the following signature:
```javascript
function(<Err>, <StoreInstance>)
```
'Err' is null if no error occured (otherwise it contains the error object).
'StoreInstance' is the resulting store instance you can pass to express-session.
Future

@@ -66,0 +89,0 @@ ======

Sorry, the diff of this file is not supported yet

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