|
@@ -63,12 +63,12 @@ var apiCofig = { |
|
@@ -63,12 +63,12 @@ var apiCofig = { |
63
|
views: path.resolve(__dirname,"apps", "0", "views/1")
|
63
|
views: path.resolve(__dirname,"apps", "0", "views/1")
|
64
|
},
|
64
|
},
|
65
|
useToEntry:function(app){
|
65
|
useToEntry:function(app){
|
66
|
- // if(process.env.NODE_ENV!="coding"&&process.env.NODE_ENV!=="test"){
|
|
|
67
|
- // options.store=new Redis({
|
|
|
68
|
- // port: 6379,
|
|
|
69
|
- // host: 'localhost'
|
|
|
70
|
- // });
|
|
|
71
|
- // }
|
66
|
+ if(process.env.NODE_ENV!="coding"&&process.env.NODE_ENV!=="test"){
|
|
|
67
|
+ options.store=new Redis({
|
|
|
68
|
+ port: 6379,
|
|
|
69
|
+ host: 'localhost'
|
|
|
70
|
+ });
|
|
|
71
|
+ }
|
72
|
app.use(session(options));
|
72
|
app.use(session(options));
|
73
|
},
|
73
|
},
|
74
|
useToOuter:function(app,controllers){
|
74
|
useToOuter:function(app,controllers){
|
|
@@ -84,6 +84,7 @@ if(process.env.NODE_ENV!=='development'){ |
|
@@ -84,6 +84,7 @@ if(process.env.NODE_ENV!=='development'){ |
84
|
|
84
|
|
85
|
/*服务器环境*/
|
85
|
/*服务器环境*/
|
86
|
if(process.env.NODE_ENV!="coding"){
|
86
|
if(process.env.NODE_ENV!="coding"){
|
|
|
87
|
+ console.log("服务器环境");
|
87
|
apiCofig.MVC={
|
88
|
apiCofig.MVC={
|
88
|
Interfacer:path.join(__dirname,"interfaces/0.js").replace(/0/g,'*'),
|
89
|
Interfacer:path.join(__dirname,"interfaces/0.js").replace(/0/g,'*'),
|
89
|
Controller:path.join(__dirname,"controllers/0.js").replace(/0/g,'*'),
|
90
|
Controller:path.join(__dirname,"controllers/0.js").replace(/0/g,'*'),
|