【文件属性】:
文件名称:koa-better-timeout:Koa和Lad的响应超时中间件(默认情况下使用Boom)
文件大小:126KB
文件格式:ZIP
更新时间:2021-02-03 17:38:59
api middleware koa time timer
更好的超时
和响应超时中间件(默认情况下使用 )
目录
安装
:
npm install koa-better-timeout
:
yarn add koa-better-timeout
用法
默认中间件使用情况:
const Timeout = require ( 'koa-better-timeout' ) ;
// ...
const timeout = new Timeout ( ) ;
app . use ( timeout . middleware ) ;
具有转换后的响应消息的高级中间件用法(例如,使用及其中间件):
const Timeout = require
【文件预览】:
koa-better-timeout-master
----.travis.yml(111B)
----index.js(2KB)
----package.json(2KB)
----test()
--------test.js(3KB)
----LICENSE(1KB)
----.gitignore(56B)
----README.md(2KB)
----yarn.lock(308KB)
----.editorconfig(147B)
----.remarkignore(23B)
----.gitattributes(12B)