@4lch4/koa-router-printer
TypeScript icon, indicating that this package has built-in type declarations

1.4.3 • Public • Published

@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-Screenshot

Example 1

Printer(app, {
  displayHead: true,
  displayPrefix: false
})

Example-Screenshot

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.

Package Sidebar

Install

npm i @4lch4/koa-router-printer

Weekly Downloads

2

Version

1.4.3

License

MIT

Unpacked Size

86.6 kB

Total Files

37

Last publish

Collaborators

  • alcha
  • 4lch4-ci