@mangar2/shutdown

1.0.3 • Public • Published

Abstract

Shutdown is a small helper to safely shutdown serivces on SIGINT ( ctrl-C ) A singelton calling a callback on SIGINT and provides a timeout if the callback does not finish in a period of time .

Example

const shutdown = require('shutdown');

shutdown(async () => {
   await myClass.close();
   process.exit(0);
});

Contents

Meta

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @mangar2/shutdown

Weekly Downloads

0

Version

1.0.3

License

LGPL-3.0-or-later

Unpacked Size

3.92 kB

Total Files

5

Last publish

Collaborators

  • mangar2