index.js
382 Bytes
/**
* sub app common
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2016/10/11
*/
var express = require('express');
var app = express();
app.disable('x-powered-by');
app.on('mount', function(parent) {
delete parent.locals.settings; // 不继承父 App 的设置
Object.assign(app.locals, parent.locals);
});
// router
app.use(require('./router'));
module.exports = app;