Authored by ccbikai

修改子app

/**
* 频道页面
* 主页
* @author: Bi Kai<kai.bi@yoho.cn>
* @date: 2016/05/09
*/
... ...
/**
* sub app channel
* sub app
* @author: Bi Kai<kai.bi@yoho.cn>
* @date: 2016/05/09
*/
var express = require('express'),
path = require('path'),
hbs = require('express-handlebars');
const express = require('express');
const path = require('path');
const hbs = require('express-handlebars');
var app = express();
const app = express();
// set view engin
var doraemon = path.join(__dirname, '../../doraemon/views'); // parent view root
const doraemon = path.join(__dirname, '../../doraemon/views'); // parent view root
app.on('mount', function(parent) {
delete parent.locals.settings; // 不继承父 App 的设置
... ...
... ... @@ -6,6 +6,6 @@
module.exports = app => {
// 公共服务
app.use(require('./apps/channel'));
// 组件
app.use('/component', require('./apps/component'));
};
... ...