/
githubmirror
/
pm2
Обзор
Документация
Войти
/
githubmirror
/
pm2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixtures/sort/http.js
20 строк
468 B
wallet77
add sorting feature for process list
10 янв 2018, 12:34
10 янв 2018, 12:34
f41ff15
Код
Авторство
О чём код?
var http = require('http'); var app = http.createServer(function(req, res) { res.writeHead(200); res.end('hey'); }) var listener = app.listen(0, function() { console.log('Listening on port ' + listener.address().port); }); process.on('message', function(msg) { if (msg == 'shutdown') { console.log('Closing all connections...'); setTimeout(function() { console.log('Finished closing connections'); process.exit(0); }, 100); } });