This module restart the app as a detached electron process, allowing an electron app to be started from terminal and survive parent process closure.
npm install --save electron-detach
const electronDetach = ;//returns true if your process is a detached child processifapp;
true if current process is already detached from the terminal.
false the process will be killed as soon a detached one is spawned.
true, this means that it is good to start your app now. If it returns
false, your process will shortly be terminated.
const electronDetach = ;if//Turn your app on, as your app is in a process that is not going to be killedelse//Your app is going to be killed. Respond accordingly
An optional object containing following property:
only restart the app if --detach command line argument is present. Defaults to false.
Path to a file where stdout and stderr of detached process will be redirected. Defaults to /dev/null
The MIT License (MIT)
Copyright (c) 2015 Andrea Parodi