close with grace:优雅地退出过程(如果可能) 对于Node.js 源码
宽限期 优雅地退出过程(如果可能)-对于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.zip
(预估有个19文件)
close-with-grace-main
.gitignore
2KB
package.json
852B
LICENSE
1KB
index.js
2KB
.github
workflows
ci.yml
450B
README.md
1KB
example.js
433B
暂无评论