@mangar2/shutdown
Version:
Implements graceful shutdown
23 lines (14 loc) • 441 B
Markdown
<!-- This file is generated by jsmddoc version 0.1 -->
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
```shell
const shutdown = require('shutdown');
shutdown(async () => {
await myClass.close();
process.exit(0);
});
```
- [Meta](