graceful-terminate
Gracefully shutdown your node app. Graceful interrupts SIGTERM
and SIGINT
signals.
Usage
var graceful = ;
Cleanup before exit.
graceful;
^CCleaning up.$
Prevent shutdown. Return true
in the function.
graceful;
^CCannot terminate yet.
You can add multiple functions. Return true
in any function to prevent shutdown and stop executing other functions.
graceful;graceful
^CCleaning up.Shutdown stops here.
License
MIT