mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
18 lines
359 B
JavaScript
18 lines
359 B
JavaScript
|
|
var http = require('http');
|
|
|
|
http.createServer(function(req, res) {
|
|
res.writeHead(200);
|
|
res.end('hey');
|
|
}).listen(0);
|
|
|
|
process.on('message', function(msg) {
|
|
if (msg == 'shutdown') {
|
|
console.log('Closing all connections...');
|
|
setTimeout(function() {
|
|
console.log('Finished closing connections');
|
|
process.exit(0);
|
|
}, 100);
|
|
}
|
|
});
|