router.js 532 Bytes
/**
 * news
 * @author: xiaoxiao<xiaoxiao.hao@yoho.cn>
 * @date: 2017/10/13
 */

'use strict';

const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';

const newsController = require(`${cRoot}/index`);
const sitemap = require('../3party/controllers/sitemap');

router.get(['/', '/index/index'], newsController.index);
router.get(/\/([\d]+)_([\d]+)_([\d]+).html/, newsController.detail);

// seo-站点地图
router.get('/sitemap.xml', sitemap.newsMap);

// ajax


module.exports = router;