routers.js 562 Bytes
import Router from 'koa-router';

import index from './actions/index';
import projects from './actions/projects';
import servers from './actions/servers';
import init from './actions/init';


const base = new Router();

export default function(app) {
    base.use('/projects', projects.routes(), projects.allowedMethods());
    base.use('/servers', servers.routes(), servers.allowedMethods());

    base.use('', index.routes(), index.allowedMethods());
    base.use('', init.routes(), init.allowedMethods());

    app.use(base.routes(), base.allowedMethods());
}