@4lch4/blipp 中文文档教程
blipp
blipp
是一个简单的 hapi 插件,用于显示路由表到控制台 启动。 它组织每个连接的显示,所以如果你有多个 连接你可以很容易地确保你已经完成了你的路由表 正确。 否则很难看到这一点。
Usage (Hapi v17)
像任何其他插件一样注册
示例参见examples
Options
以下选项可用:
showAuth
: Shows any hapi authentication scheme using server.auth.strategy. Default: falseshowScope
: Shows route access rules using route.options.auth.access.scope. Default: falseshowStart
: Shows route information during startup of server. Default: true
该模块还注册了'info()' 和 'text()' API 方法:
console.log(server.plugins.blipp.info());
console.log(server.plugins.blipp.text());
var json = JSON.stringify(server.plugins.blipp.info());
使用 showAuth:
Versions
- 1.x = hapi 7.x
- 2.x = hapi 8.x
- 3.x = hapi 17.x
- 4.x = hapi 18.x
blipp
blipp
is a simple hapi plugin to display the routes table to console at startup. It organizes the display per connection so if you have multiple connections you can easily ensure that you've done your routing table correctly. This can be difficult to see otherwise.
Usage (Hapi v17)
Register like any other plugin
See examples for examples
Options
The following options are available:
showAuth
: Shows any hapi authentication scheme using server.auth.strategy. Default: falseshowScope
: Shows route access rules using route.options.auth.access.scope. Default: falseshowStart
: Shows route information during startup of server. Default: true
The module also registers the 'info()' and 'text()' API methods:
console.log(server.plugins.blipp.info());
console.log(server.plugins.blipp.text());
var json = JSON.stringify(server.plugins.blipp.info());
With showAuth:
Versions
- 1.x = hapi 7.x
- 2.x = hapi 8.x
- 3.x = hapi 17.x
- 4.x = hapi 18.x