Authored by weiqingting

redis

@@ -66,16 +66,12 @@ var apiCofig = { @@ -66,16 +66,12 @@ var apiCofig = {
66 }, 66 },
67 useToEntry:function(app){ 67 useToEntry:function(app){
68 if(process.env.NODE_ENV!="coding"){ 68 if(process.env.NODE_ENV!="coding"){
69 - app.use(session({  
70 - store: new Redis({ 69 + options.store=new Redis({
71 port: 6379, 70 port: 6379,
72 host: 'localhost' 71 host: 'localhost'
73 - }),  
74 - secret: options.secret  
75 - }));  
76 - }else{  
77 - app.use(session(options)); 72 + });
78 } 73 }
  74 + app.use(session(options));
79 }, 75 },
80 useToOuter:function(app,controllers){ 76 useToOuter:function(app,controllers){
81 app.use(grayroute(controllers)); 77 app.use(grayroute(controllers));
@@ -66,16 +66,12 @@ var apiCofig = { @@ -66,16 +66,12 @@ var apiCofig = {
66 }, 66 },
67 useToEntry:function(app){ 67 useToEntry:function(app){
68 if(process.env.NODE_ENV!="coding"){ 68 if(process.env.NODE_ENV!="coding"){
69 - app.use(session({  
70 - store: new Redis({ 69 + options.store=new Redis({
71 port: 6379, 70 port: 6379,
72 host: 'localhost' 71 host: 'localhost'
73 - }),  
74 - secret: options.secret  
75 - }));  
76 - }else{  
77 - app.use(session(options)); 72 + });
78 } 73 }
  74 + app.use(session(options));
79 }, 75 },
80 useToOuter:function(app,controllers){ 76 useToOuter:function(app,controllers){
81 app.use(grayroute(controllers)); 77 app.use(grayroute(controllers));