NodeJs no evento de saída

import process from 'process';

process.on('exit', (code) => {
  console.log(`About to exit with code: ${code}`);
});
Frightened Fox