kill-it-with-fire

2.0.0 • Public • Published

KILL IT WITH FIRE

Install

npm install kill-it-with-fire

Usage

var killItWithFire = require('kill-it-with-fire');
 
process.on('SIGTERM', function () {
  // Do the stuff that *should* let your process exit cleanly...
  sockets.closeEm();
  server.stopIt();
  connections.breakUpWith();
 
  // And usually that works fine...but when something is still hanging...
  killItWithFire();
 
  // Alternatively, you can pass options to `killItWithFire()`.
  killItWithFire({wait: 5000})
});

killItWithFire(options)

wait (default 10000)

The time (in ms) to wait before killing it with fire.

log (default console.error.bind(console))

A function to use to log the immolation.

code (default 1)

The code to exit the process with.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i kill-it-with-fire

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • caseywebdev