@4lch4/koa-router-printer
v1.4.3
Published
A Koa middleware that outputs the routes registered to the application.
Downloads
61
Readme
@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.