/
githubmirror
/
pm2
Обзор
Документация
Войти
/
githubmirror
/
pm2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/wait-ready/app.js
22 строки
415 B
Unitech
Update README.md and fully restructure tests
24 янв 2018, 14:43
24 янв 2018, 14:43
dcd190b
Код
Авторство
О чём код?
const http = require('http'); process.on('SIGINT', (msg) => { console.log('Just got SIGINTed, but I dont care'); process.exit(0); }); const port = 3000; const app = http.createServer((_, res) => { res.writeHead(200); res.end('Hello!'); }); setTimeout(() => { app.listen(port, () => { console.log(`Listening on ${port}`); if (process.send) { process.send('ready'); } }); }, 10000);