Not a pain at all, but in Electron, we might want some method to close entirely our software.
We know that we can access our electron’s app via the renderer by calling the object remote. So this is the solution
const app = require('electron').remote.app
If you know a better solution,share it with us in the comments bellow !