Authored by ccbikai

环境修改

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