...
|
...
|
@@ -20,7 +20,6 @@ const favicon = require('serve-favicon'); |
|
|
const yohoLib = require('yoho-node-lib');
|
|
|
const session = require('express-session');
|
|
|
const memcached = require('connect-memcached');
|
|
|
const hbs = require('express-handlebars');
|
|
|
const pkg = require('./package.json');
|
|
|
const devtools = require('./doraemon/middleware/devtools');
|
|
|
|
...
|
...
|
@@ -45,13 +44,12 @@ if (app.locals.devEnv) { |
|
|
app.use(devtools());
|
|
|
}
|
|
|
|
|
|
app.set('view engine', '.hbs');
|
|
|
app.set('views', './doraemon/views');
|
|
|
app.engine('.hbs', hbs({
|
|
|
app.use(global.yoho.hbs({
|
|
|
extname: '.hbs',
|
|
|
defaultLayout: 'layout',
|
|
|
layoutsDir: './doraemon/views',
|
|
|
partialsDir: './doraemon/views/partial',
|
|
|
layoutsDir: path.join(__dirname, 'doraemon/views'),
|
|
|
partialsDir: path.join(__dirname, 'doraemon/views/partial'),
|
|
|
views: path.join(__dirname, 'doraemon/views'),
|
|
|
helpers: global.yoho.helpers
|
|
|
}));
|
|
|
|
...
|
...
|
|