Sha256: ef48185e70da4b68b2cc67b2f1215827be3ed71dbbea59c7ade33f7a1f21c274
Contents?: true
Size: 486 Bytes
Versions: 15
Compression:
Stored size: 486 Bytes
Contents
'use strict'; const signals = ['SIGINT', 'SIGTERM']; function setupExitSignals(serverData) { signals.forEach((signal) => { process.on(signal, () => { if (serverData && serverData.server) { serverData.server.close(() => { // eslint-disable-next-line no-process-exit process.exit(); }); } else { // eslint-disable-next-line no-process-exit process.exit(); } }); }); } module.exports = setupExitSignals;
Version data entries
15 entries across 14 versions & 4 rubygems