You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 year ago | |
---|---|---|
.github | 1 year ago | |
.vscode | 2 years ago | |
examples | 2 years ago | |
src | 2 years ago | |
.gitignore | 2 years ago | |
.prettierignore | 2 years ago | |
.prettierrc | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
package.json | 1 year ago | |
tsconfig.json | 2 years ago | |
yarn.lock | 2 years ago |
README.md
@4lch4/koa-router-printer
This repo is a lightweight utility for Koa.js applications that utilize @koa/router. It outputs a two-column table containing the registered path(s) and method(s).
Examples
NOTE: These examples are also available in the examples directory.
Example 0
Printer(app, {
displayHead: false,
displayPrefix: true
})
Example 1
Printer(app, {
displayHead: true,
displayPrefix: false
})
Options
The module accepts two options along with the app parameter:
displayHead
- Whether or not to display the HEAD method with a path.
displayPrefix
- Whether or not to display the prefix ahead of each Route path.