Skip to content

Instantly share code, notes, and snippets.

View martinshaw's full-sized avatar
🚀

Martin Shaw martinshaw

🚀
View GitHub Profile
@martinshaw
martinshaw / before-shutdown.js
Created February 24, 2024 22:25 — forked from nfantone/before-shutdown.js
Node.js graceful shutdown handler
'use strict';
/**
* @callback BeforeShutdownListener
* @param {string} [signalOrEvent] The exit signal or event name received on the process.
*/
/**
* System signals the app will listen to initiate shutdown.
* @const {string[]}