fastify-boom:Fastify Boom支持-HTTP友好的错误对象

时间:2021-05-17 00:17:38
【文件属性】:
文件名称:fastify-boom:Fastify Boom支持-HTTP友好的错误对象
文件大小:84KB
文件格式:ZIP
更新时间:2021-05-17 00:17:38
JavaScript 固定臂 Fastify Boom支持-HTTP友好的错误对象 安装 npm i fastify-boom 用法 const fastify = require ( 'fastify' ) ( ) const Boom = require ( 'boom' ) fastify . register ( require ( 'fastify-boom' ) ) fastify . get ( '/' , async function ( req , reply ) { throw new Boom ( 'Opppps!' ) } ) fastify . listen ( 3000 , err => { if ( err ) { fastify . log . error ( err ) } } ) 学分 HTTP友好错误对象
【文件预览】:
fastify-boom-master
----.travis.yml(109B)
----index.js(558B)
----test.js(2KB)
----package.json(1KB)
----.eslintrc.json(133B)
----.prettierrc(116B)
----.prettierignore(13B)
----LICENSE(1KB)
----package-lock.json(305KB)
----example.js(320B)
----.gitignore(578B)
----README.md(722B)
----.eslintignore(57B)
----.editorconfig(479B)

网友评论