Skip to content

einsqing/koa-directory-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

koa文件夹路由加载

Installation

$ npm install koa-directory-router

Use with koa

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中可变参数

作者官网: http://www.wemallshop.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published