app.js
//so the program will not close instantly
so the program will not close instantly
so the program will not close instantly
function exitHandler(options, err) {
  if (options.cleanup) {
    console.log('Closing DB Connections');
    require('./config/Postgres').pool.close();
  }
  if (err) {
    console.error(err.stack);
    require('./config/Postgres').pool.close();
  }
  if (options.exit) {
    require('./config/Postgres').pool.close();
    process.exit();
  }
}
function exitHandler ( options , err ) { if ( options . cleanup ) { console . log ( 'Closing DB Connections' ) ; require ( './config/Postgres' ) . pool . close ( ) ; } if ( err ) { console . error ( err . stack ) ; require ( './config/Postgres' ) . pool . close ( ) ; } if ( options . exit ) { require ( './config/Postgres' ) . pool . close ( ) ; process . exit ( ) ; } }
so the program will not close instantly
so the program will not close instantly