Authored by yyq

page name & favicon

... ... @@ -3,15 +3,18 @@ module.exports = [
route: /xianyu\/index\/channel/,
cacheTime: 60,
cache: true,
pageName: 'channel'
},
{
route: /xianyu\/index/,
cacheTime: 60,
cache: true,
pageName: 'channel'
},
{
route: /xianyu\/index\/category/,
cacheTime: 30,
cache: true,
pageName: 'category'
},
];
... ...
... ... @@ -8,6 +8,7 @@ const pkg = require('./package.json');
const devtools = require('./doraemon/middleware/devtools');
const _ = require('lodash');
const uuid = require('uuid');
const favicon = require('serve-favicon');
// 全局注册library
yohoLib.global(config);
... ... @@ -38,6 +39,7 @@ exports.createApp = async(app) => {
}
app.set('etag', false);
app.use(favicon(path.join(__dirname, './favicon.ico')));
app.use('/xianyu/node/status.html', (req, res) => {
res.status(200).end();
... ...
... ... @@ -140,6 +140,7 @@ const render = (route) => {
app: config.appName,
ip: req.yoho.clientIp,
path: req.url,
pageName: _.get(route, 'pageName', 'unknown'),
uid: req.user.uid,
udid: req.cookies.udid || '',
clientType: req.yoho.clientType || '',
... ...
No preview for this file type