pm25
Version:
Production process manager for Node.JS applications with a built-in load balancer.
19 lines (15 loc) • 343 B
JavaScript
var exit = function() {
console.log("Delay exit in 2 secs");
setTimeout(function(){
process.exit();
}, 2000);
};
process.on('SIGTERM', function() {
console.log('Got SIGTERM signal.');
exit();
});
process.on('SIGINT', function() {
console.log('Got SIGINT signal');
exit();
});
setInterval(function keepMeAlive() {}, 1000);