mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
24 lines
429 B
JavaScript
24 lines
429 B
JavaScript
const http = require('http');
|
|
|
|
const port = 3000;
|
|
|
|
const app = http.createServer((_, res) => {
|
|
res.writeHead(200);
|
|
res.end('Hello!');
|
|
});
|
|
|
|
console.log('Starting app...');
|
|
|
|
process.on('SIGINT', (msg) => {
|
|
console.log('Just got SIGINTed, but I dont care');
|
|
});
|
|
|
|
setTimeout(() => {
|
|
app.listen(port, () => {
|
|
console.log(`Listening on ${port}`);
|
|
if (process.send) {
|
|
process.send('ready');
|
|
}
|
|
});
|
|
}, 10000);
|