File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 9
9
"dependencies" : {
10
10
"bluebird" : " ^3.4.7" ,
11
11
"body-parser" : " ^1.15.2" ,
12
+ "connect-redis" : " ^3.2.0" ,
12
13
"cors" : " ^2.8.1" ,
13
14
"dataloader" : " ^1.2.0" ,
14
15
"express" : " ^4.14.0" ,
Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ import express from 'express';
13
13
import cors from 'cors' ;
14
14
import bodyParser from 'body-parser' ;
15
15
import session from 'express-session' ;
16
+ import connectRedis from 'connect-redis' ;
16
17
import flash from 'express-flash' ;
17
18
import expressGraphQL from 'express-graphql' ;
18
19
import PrettyError from 'pretty-error' ;
20
+ import redis from './redis' ;
19
21
import passport from './passport' ;
20
22
import schema from './schema' ;
21
23
import accountRoutes from './routes/account' ;
@@ -28,6 +30,7 @@ app.use(cors());
28
30
app . use ( bodyParser . urlencoded ( { extended : true } ) ) ;
29
31
app . use ( bodyParser . json ( ) ) ;
30
32
app . use ( session ( {
33
+ store : new ( connectRedis ( session ) ) ( { client : redis } ) ,
31
34
name : 'sid' ,
32
35
resave : true ,
33
36
saveUninitialized : true ,
Original file line number Diff line number Diff line change 609
609
version "0.1.1"
610
610
resolved "https://registry.yarnpkg.com/connect-flash/-/connect-flash-0.1.1.tgz#d8630f26d95a7f851f9956b1e8cc6732f3b6aa30"
611
611
612
+ connect-redis@^3.2.0 :
613
+ version "3.2.0"
614
+ resolved "https://registry.yarnpkg.com/connect-redis/-/connect-redis-3.2.0.tgz#2d29ea60c8ae8c2c818a710247fdfed158f43388"
615
+ dependencies :
616
+ debug "^2.2.0"
617
+ redis "^2.1.0"
618
+
612
619
console-control-strings@^1.0.0, console-control-strings@~1.1.0 :
613
620
version "1.1.0"
614
621
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
@@ -2445,7 +2452,7 @@ redis-parser@^2.0.0:
2445
2452
version "2.3.0"
2446
2453
resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.3.0.tgz#313a47965e49ee35ab3a86c93388b403d76237f6"
2447
2454
2448
- redis@^2.6.3 :
2455
+ redis@^2.1.0, redis@^2. 6.3 :
2449
2456
version "2.6.3"
2450
2457
resolved "https://registry.yarnpkg.com/redis/-/redis-2.6.3.tgz#84305b92553c6a1f09c7c47c30b11ace7dbb7ad4"
2451
2458
dependencies :
You can’t perform that action at this time.
0 commit comments