pm2/test/fixtures/child_no_http.js
2015-06-04 19:32:50 +02:00

21 lines
413 B
JavaScript

var pmx = require('pmx').init({
http: false
});
var http = require('http');
http.createServer(function(req, res) {
res.writeHead(200);
res.end('hey');
}).listen(8000);
process.on('message', function(msg) {
if (msg == 'shutdown') {
console.log('Closing all connections...');
setTimeout(function() {
console.log('Finished closing connections');
process.exit(0);
}, 100);
}
});