/
githubmirror
/
pm2
Обзор
Документация
Войти
/
githubmirror
/
pm2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixtures/watch/http.js
22 строки
504 B
Unitech
#2471 make env immutable and fix watch
26 окт 2016, 19:07
26 окт 2016, 19:07
f6b550c
Код
Авторство
О чём код?
var http = require('http'); var app = http.createServer(function(req, res) { res.writeHead(200); res.end('hey'); }) console.log(process.env.TOTO_ENV); 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); } });