Authored by ccbikai

环境修改

@@ -28,6 +28,7 @@ const MemcachedStore = memcached(session); @@ -28,6 +28,7 @@ const MemcachedStore = memcached(session);
28 28
29 // 向模板注入变量 29 // 向模板注入变量
30 app.locals.devEnv = app.get('env') === 'development'; 30 app.locals.devEnv = app.get('env') === 'development';
  31 +app.locals.proEnv = app.get('env') === 'production';
31 app.locals.version = pkg.version; 32 app.locals.version = pkg.version;
32 33
33 // 全局注册library 34 // 全局注册library
@@ -12,7 +12,7 @@ module.exports = app => { @@ -12,7 +12,7 @@ module.exports = app => {
12 app.use('/home', require('./apps/home')); 12 app.use('/home', require('./apps/home'));
13 13
14 // 组件示例 14 // 组件示例
15 - if (app.locals.devEnv) { 15 + if (!app.locals.proEnv) {
16 app.use('/example', require('./apps/example')); 16 app.use('/example', require('./apps/example'));
17 } 17 }
18 }; 18 };