Authored by 李奇

删除多余文件

1 -/**  
2 - * 管理员app  
3 - * @author: leo <qi.li@yoho.cn>  
4 - * @date: 23/06/2017  
5 - */  
6 -const path = require('path');  
7 -const express = require('express');  
8 -const app = express();  
9 -  
10 -const doraemon = path.join(__dirname, '../../doraemon/views'); // parent view root  
11 -  
12 -app.on('mount', function(parent) {  
13 -  
14 - delete parent.locals.settings; // 不继承父 App 的设置  
15 - Object.assign(app.locals, parent.locals);  
16 -});  
17 -  
18 -app.use(global.yoho.hbs({  
19 - extname: '.hbs',  
20 - defaultLayout: 'error',  
21 - layoutsDir: doraemon,  
22 - partialsDir: path.join(__dirname, 'views/partial'),  
23 - views: path.join(__dirname, 'views/action'),  
24 - helpers: global.yoho.helpers  
25 -}));  
26 -  
27 -app.locals.layout = 'error';  
28 -  
29 -app.use(require('./router'));  
30 -  
31 -module.exports = app;