koa文件夹路由加载
$ npm install koa-directory-router
var app = require('koa')();
var directoryRouter = require('koa-directory-router');
var admin = directoryRouter({
root: path.resolve(__dirname, path.normalize('./../app/controller/admin')),
suffix: '.js',
prefix: '/v1'
});
app.use(admin.routes());
提示:文件夹名可定义为router中可变参数