ar

auto-routes

a tool for express to auto map url routes and project's routes directory

Showing:

Popularity

Downloads/wk

1

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.5KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

auto-routes

a tool for express to auto map url routes and project's routes directory

根据项目目录自动生成路由,基于express

用法

安装

    npm install auto-routes --save

引入

在express工程目录下的app.js里

    var autoRoutes=require('auto-routes')
    
    autoRoutes(app,'routes目录路径')

然后,auto-routes就会自动帮你生成路由 ^.^

注意:index.js对应默认路径'/'

简单demo

dependence:

node.js V4+

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial