redis store changed, ok

This commit is contained in:
Evert Prants 2019-10-23 11:41:12 +03:00
parent 4dd14bb624
commit 4dda891389
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 28 additions and 1 deletions

3
app.js
View File

@ -9,6 +9,7 @@ const path = require('path')
const toml = require('toml')
const fs = require('fs')
const uuid = require('uuid/v4')
const redis = require('redis')
const connectSession = require('connect-redis')
require('express-async-errors')
@ -98,7 +99,7 @@ app.use(session({
secret: config['Streaming']['Secret'],
resave: false,
saveUninitialized: true,
store: new SessionStore(),
store: new SessionStore({ client: redis.createClient() }),
cookie: {
secure: !dev,
maxAge: 2678400000 // 1 month

25
package-lock.json generated
View File

@ -1804,6 +1804,11 @@
"is-obj": "^1.0.0"
}
},
"double-ended-queue": {
"version": "2.1.0-0",
"resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
"integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw="
},
"duplexer3": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
@ -4887,6 +4892,26 @@
"strip-indent": "^2.0.0"
}
},
"redis": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz",
"integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==",
"requires": {
"double-ended-queue": "^2.1.0-0",
"redis-commands": "^1.2.0",
"redis-parser": "^2.6.0"
}
},
"redis-commands": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz",
"integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg=="
},
"redis-parser": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz",
"integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs="
},
"regex-not": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",

View File

@ -27,6 +27,7 @@
"express-async-errors": "^3.1.1",
"express-session": "^1.16.1",
"nunjucks": "^3.2.0",
"redis": "^2.8.0",
"request": "^2.88.0",
"sqlite": "^3.0.3",
"toml": "^3.0.0",