index.js 415 Bytes
/**
 * some common api app
 * @author: jiangfeng<jeff.jiang@yoho.cn>
 * @date: 2016/08/22
 */

var express = require('express');

var app = express();

// set view engin

app.on('mount', function(parent) {
    delete parent.locals.settings; // 不继承父 App 的设置
    Object.assign(app.locals, parent.locals);
});

app.disable('x-powered-by');

// router
app.use(require('./router'));

module.exports = app;