dispatch.js 526 Bytes
/**
 * API路由分发
 * @author: Leo <qi.li@yoho.cn>
 * @date: 2017/6/23
 */
const api = require('./apps/api');
const admin = require('./apps/admin');
const article = require('./apps/article');
const passport = require('./apps/passport');
const authAdmin = require('./doraemon/middleware/authAdmin');

module.exports = app => {
    // api
    app.use('/api', api);

    // 管理
    app.use('/admin', authAdmin, admin);

    // 验证
    app.use('/passport', passport);

    // 文章
    app.use('/article', article);
};