IIUC the following code will stop the app's electron process on all OSs except Apples (Darwin):
app.on('window-all-closed', () => {
if (process.platform != 'darwin') {
app.quit();
}
})
How do we ensure that the process running the app also stops on Darwin?
If I am not mistaken, excluding darwin platform is just to replicate that OS behaviour: on Windows and Linux, the convention is to terminate (quit) the software when a user closes its window; whereas on macOS, the convention is to keep the process in background.
There is nothing preventing you from breaking that convention and to make quit the app when the user closes the window.