I\'m executing some asynchronous process with firebase with NodeJS.
I\'d like to stop when finish all tasks the NodeJS process execution without the need of Ctrl+C c
First, all your asynchronous processes should be promises, then you wrap all of these promises in a single promise with Promise.all and exit when that promise resolves. Like this:
Promise.all([
promiseForAsynchronousProcess1,
promiseForAsynchronousProcess2,
promiseForAsynchronousProcess3,
... and so on...
]).then(process.exit);