1.0.37 • Published 8 years ago

koa-grace-router v1.0.37

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

koa-grace-router

Build Status

File/Folder as path, another router middleware for koa.

Install

$ npm install koa-grace-router --save

Usage

router(app, options)
  • app: {Object} koa instance.
  • options: {Object|String->root}
    • root: {String} router directory

Example

File tree

├── app.js
└── controller
    ├── deal
    │   ├── index.js
    │   └── refund.js
    ├── index.js
    └── test.js

app.js

var koa = require('koa');
var router = require('koa-grace-router');

app.use(router(app, {
  root: './example/controller'
}));

app.listen(3000);

Test

npm test

License

MIT

1.0.37

8 years ago

1.0.36

8 years ago

1.0.35-rc1

8 years ago

1.0.35

8 years ago

1.0.34

8 years ago

1.0.33

8 years ago

1.0.32

8 years ago

1.0.31

8 years ago

1.0.30

8 years ago

1.0.29

8 years ago

1.0.28

8 years ago

1.0.27

8 years ago

1.0.26

8 years ago

1.0.25

8 years ago

1.0.24

8 years ago

1.0.23

8 years ago

1.0.22

8 years ago

1.0.21

8 years ago

1.0.20

8 years ago

1.0.19

8 years ago

1.0.18

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago