How to prevent multiple instances in Electron
问题 I do not know if this is possible but I might as well give it a chance and ask. I'm doing an Electron app and I'd like to know if it is possible to have no more than a single instance at a time. I have found this gist but I'm not sure hot to use it. Can someone shed some light of share a better idea ? var preventMultipleInstances = function(window) { var socket = (process.platform === 'win32') ? '\\\\.\\pipe\\myapp-sock' : path.join(os.tmpdir(), 'myapp.sock'); net.connect({path: socket},