express-session-mongodb
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75288
96