Authored by weiqingting

redis

... ... @@ -66,16 +66,12 @@ var apiCofig = {
},
useToEntry:function(app){
if(process.env.NODE_ENV!="coding"){
app.use(session({
store: new Redis({
port: 6379,
host: 'localhost'
}),
secret: options.secret
}));
}else{
app.use(session(options));
options.store=new Redis({
port: 6379,
host: 'localhost'
});
}
app.use(session(options));
},
useToOuter:function(app,controllers){
app.use(grayroute(controllers));
... ...
... ... @@ -66,16 +66,12 @@ var apiCofig = {
},
useToEntry:function(app){
if(process.env.NODE_ENV!="coding"){
app.use(session({
store: new Redis({
port: 6379,
host: 'localhost'
}),
secret: options.secret
}));
}else{
app.use(session(options));
options.store=new Redis({
port: 6379,
host: 'localhost'
});
}
app.use(session(options));
},
useToOuter:function(app,controllers){
app.use(grayroute(controllers));
... ...