Skip to content

Commit

Permalink
Merge pull request #1 from david-benes/master
Browse files Browse the repository at this point in the history
Updated package.json
  • Loading branch information
david-benes authored Oct 2, 2023
2 parents 7c5c969 + d3b7a32 commit 6c6d305
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"redis",
"cookies"
],
"version": "1.0.5",
"version": "1.0.6",
"dependencies": {
"express-session": "^1.17.1",
"mongoose": "5.11.13",
"redis": "0.x.x"
},
"main": "./lib/index.js",
"main": "./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": "[email protected]",
"_from": "[email protected]"
Expand Down

0 comments on commit 6c6d305

Please sign in to comment.