...
|
...
|
@@ -28,6 +28,7 @@ const _ = require('lodash'); |
|
|
const fp = require('lodash/fp');
|
|
|
|
|
|
const pkg = require('./package.json');
|
|
|
const hbsEvent = require('./config/hbsevent');
|
|
|
const app = express();
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
...
|
...
|
@@ -75,7 +76,8 @@ app.use(global.yoho.hbs({ |
|
|
layoutsDir: path.join(__dirname, 'doraemon/views'),
|
|
|
partialsDir: path.join(__dirname, 'doraemon/views/partial'),
|
|
|
views: path.join(__dirname, 'doraemon/views'),
|
|
|
helpers: Object.assign(global.yoho.helpers, require('./utils/helpers'))
|
|
|
helpers: Object.assign(global.yoho.helpers, require('./utils/helpers')),
|
|
|
cb: hbsEvent.cb
|
|
|
}));
|
|
|
|
|
|
app.use(favicon(path.join(__dirname, '/favicon.ico')));
|
...
|
...
|
@@ -181,4 +183,8 @@ try { |
|
|
// listener
|
|
|
app.listen(config.port, function() {
|
|
|
logger.info('yohobuy start');
|
|
|
hbsEvent.event.on('hbs-complete', () => {
|
|
|
process.send && process.send('ready');
|
|
|
logger.info('hbs-all-complete');
|
|
|
});
|
|
|
}); |
...
|
...
|
|