close-with-grace:优雅地退出过程(如果可能)-对于Node.js

时间:2024-03-25 05:32:29
【文件属性】:

文件名称:close-with-grace:优雅地退出过程(如果可能)-对于Node.js

文件大小:11KB

文件格式:ZIP

更新时间:2024-03-25 05:32:29

JavaScript

宽限期 优雅地退出过程(如果可能)-对于Node.js 安装 npm i close-with-grace 用法 const closeWithGrace = require ( 'close-with-grace' ) // delay is the number of milliseconds for the graceful close to // finish. closeWithGrace ( { delay : 500 } , async function ( { signal , err , manual } ) { if ( err ) { console . error ( err ) } await closeYourServer ( ) } ) 原料药 closeWithGrace([opts], fn({ err, signal, manual


【文件预览】:
close-with-grace-main
----.gitignore(2KB)
----package.json(852B)
----LICENSE(1KB)
----index.js(2KB)
----.github()
--------workflows()
----README.md(1KB)
----example.js(433B)
----index.test-d.ts(2KB)
----test()
--------callbacks.js(336B)
--------uninstall.js(217B)
--------self-close.js(240B)
--------uncaughtException.js(215B)
--------no-resolve.js(319B)
--------closing-state.js(276B)
--------close.test.js(4KB)
--------simple.js(396B)
--------unhandledRejection.js(221B)
--------no-delay.js(380B)
----index.d.ts(1KB)

网友评论