-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpackage.json
executable file
·31 lines (31 loc) · 1.79 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"name": "express-sessions",
"homepage": "http://github.com/konteck/express-sessions",
"author": {
"name": "Alex Movsisyan",
"url": "http://github.com/konteck/express-sessions"
},
"repository": {
"type": "git",
"url": "http://github.com/konteck/express-sessions"
},
"description": "ExpressJS MongoDB/Redis Session Storage",
"keywords": [
"sessions",
"express",
"mongodb",
"mongoose",
"redis",
"cookies"
],
"version": "1.0.6",
"dependencies": {
"express": "2.x.x",
"mongoose": "4.x.x",
"redis": "0.x.x"
},
"main": "./lib/index.js",
"readme": "# express-sessions\n\nExpressJS/Mongoose Session Storage\n\n## Installation\n\n```\nnpm install express-sessions\n```\n\n## Usage\n\n``` js\nvar mongoose = require('mongoose');\n\nmongoose.connect();\n\napp.use(express.session({\n secret: 'a4f8071f-c873-4447-8ee2',\n cookie: { maxAge: 2628000000 },\n store: new (require('express-sessions'))({\n storage: 'mongodb',\n instance: mongoose, // optional\n host: 'localhost', // optional\n port: 27017, // optional\n db: 'test', // optional\n collection: 'sessions', // optional\n expire: 86400 // optional\n })\n}));\n```\nOr\n\n``` js\nvar redis = require('redis');\nvar client = redis.createClient(6379, 'localhost');\n\napp.use(express.session({\n secret: 'a4f8071f-c873-4447-8ee2',\n cookie: { maxAge: 2628000000 },\n store: new (require('express-sessions'))({\n storage: 'redis',\n instance: client, // optional\n host: 'localhost', // optional\n port: 6379, // optional\n collection: 'sessions', // optional\n expire: 86400 // optional\n })\n}));\n```\n\nThat's it!",
"_id": "express-sessions@1.0.5",
"_from": "express-sessions@1.0.5"
}