dispatch.js 462 Bytes
/**
 * 路由分发
 *
 * @author: Aiden Xu<aiden.xu@yoho.cn>
 * @date: 2016/4/27
 */

module.exports = app => {
    app.use('/', require('./apps/channel'));
    app.use('/api', require('./apps/api'));
    app.use('/product', require('./apps/product'));
    app.use('/home', require('./apps/home'));
    app.use('/news', require('./apps/news'));

    // 组件示例
    if (!app.locals.proEnv) {
        app.use('/example', require('./apps/example'));
    }
};