Authored by weiqingting

提交

... ... @@ -11,7 +11,7 @@ var grayroute = require("./mid/grayrouter");
/*session 配置*/
var options = {
secret: 'yohobuy.portal', //session配置
secret: 'yohobuy.shops', //session配置
cookie: {secure: false, maxAge: 3600000},
resave: false,
saveUninitialized: true
... ...
... ... @@ -13,6 +13,7 @@ function addFiles(req) {
module.exports=function(controllers){
var Iaccount=global.Register.system;
return function(err,req,res,next){
console.log(err);
console.log("req.originalUrl:"+req.originalUrl)
if(err.status=="404"){
var method = req.method.toLowerCase();
... ...
... ... @@ -65,12 +65,12 @@ var apiCofig = {
views: path.resolve(__dirname,"apps", "0", "views/1")
},
useToEntry:function(app){
// if(process.env.NODE_ENV!="coding"){
// options.store=new Redis({
// port: 6379,
// host: 'localhost'
// });
// }
if(process.env.NODE_ENV!="coding"){
options.store=new Redis({
port: 6379,
host: 'localhost'
});
}
app.use(session(options));
},
useToOuter:function(app){
... ...