1.0.3 • Published 3 years ago

@mangar2/shutdown v1.0.3

Weekly downloads
4
License
LGPL-3.0-or-later
Repository
github
Last release
3 years ago

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