node js exit process from within and make sure it call shutdown hook code example
Example: Process event is emitted right before Node Process crashes and exits:
Process event is emitted right before Node Process crashes and exits:
Process event is emitted right before Node Process crashes and exits: