Open
Description
I have the following code to terminate nodejs cleanly:
process.on('SIGINT', () => {
console.info('Señal SIGINT recivida');
console.log('Cerrando el servidor....');
server.close(() => {
console.log('Servidor http detenido');
pool.end()
.then(() => {
console.log('\u001b[36m\u001b[1mConexion a la base de datos terminada\u001b[0m\n')
process.exit(0)
})
});
});
but when I call pool.end()
it just doesn't return to execute what's in the .then ()
Metadata
Metadata
Assignees
Labels
No labels