I have an Electron JS desktop application that is supposed to do some closing operations when it's closed or quit. However, the app is closing before my asynchronous operations are ended.
How can I make the app wait for the asynchronous options to complete and close only when they are done?
You can use before-quit event in main process(main.js):