...
|
...
|
@@ -38,6 +38,7 @@ global.utils = path.resolve('./utils'); |
|
|
|
|
|
const logger = global.yoho.logger;
|
|
|
|
|
|
app.set('subdomain offset', 3);
|
|
|
app.set('view engine', '.hbs');
|
|
|
app.set('views', './doraemon/views');
|
|
|
app.engine('.hbs', hbs({
|
...
|
...
|
@@ -82,6 +83,7 @@ app.use((req, res, next) => { |
|
|
|
|
|
// dispatcher
|
|
|
try {
|
|
|
const shopCheck = require('./doraemon/middleware/shop-check');
|
|
|
const user = require('./doraemon/middleware/user');
|
|
|
const setYohoData = require('./doraemon/middleware/set-yoho-data');
|
|
|
const errorHanlder = require('./doraemon/middleware/error-handler');
|
...
|
...
|
@@ -89,6 +91,7 @@ try { |
|
|
|
|
|
|
|
|
// YOHO 前置中间件
|
|
|
app.use(shopCheck());
|
|
|
app.use(setYohoData());
|
|
|
app.use(user());
|
|
|
app.use(setPageInfo());
|
...
|
...
|
|