like-process:处理资源和事件以正常退出

时间:2024-05-30 10:55:51
【文件属性】:

文件名称:like-process:处理资源和事件以正常退出

文件大小:12KB

文件格式:ZIP

更新时间:2024-05-30 10:55:51

like process uptime exit gracefully

类似过程 处理资源和事件以正常退出 const like = require ( 'like-process' ) ; setTimeout ( ( ) => this_var_not_exists , 2000 ) ; let intervalId = setInterval ( ( ) => { console . log ( 'count' ) ; } , 500 ) ; like . on ( 'cleanup' , ( ) => { console . log ( 'cleanup' ) ; clearInterval ( intervalId ) ; } ) ; like . handle ( 'uncaughtException' , ( evt , err ) => { console . error ( err ) ; } ) ; 安装 npm i li


【文件预览】:
like-process-master
----.gitignore(32B)
----README.md(4KB)
----examples()
--------noncluster_loop.js(518B)
--------cluster_reload.js(444B)
--------noncluster_server.js(703B)
--------config_and_flexibility.js(2KB)
--------noncluster_uncaught.js(431B)
--------cluster_uncaught.js(537B)
--------noncluster_error.js(706B)
--------noncluster_complete.js(1KB)
--------noncluster_empty_loop.js(333B)
--------cluster_complete.js(1KB)
--------cluster_server.js(749B)
--------pm2_cluster_fork.js(1KB)
--------cluster_disconnect.js(449B)
----LICENSE(1KB)
----package.json(726B)
----index.js(5KB)

网友评论