dispatch.js 416 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'));

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