simple-web-server
simple-web-server copied to clipboard
Open at startup in the background
Can it be turned on and self-starting, and the window is closed directly after opening, there is no sign, but it is turned on and self-starting
ps: At present, it is turned on and self-starting. I need to close the window after turning it on. Although it is only a click, it will affect the experience very much, thank you!
Are you using Windows or macOS? Have you changed your setting so that the program launches when you turn in your computer?
I am a mac, and this is how I use it, but after setting it like this, a window will appear every time I turn it on.


It looks like this when booting, and I don't want this window to appear, it's silent in the background
Thanks for the suggestion. It looks like this might take more than just a little work to do, so it might not happen for awhile.
Related: https://www.github.com/Teamwork/node-auto-launch/issues/93 https://www.github.com/electron/electron/issues/7312
It's okay, I can wait, looking forward to your new update.
+1
+1
For macOS we can use the openAsHidden
flag of app.setLoginItemSettings
, but it only works on macOS non-MAS builds. However, we should be able to pass a custom argument to detect opening at startup and avoid creating the window.
See https://www.electronjs.org/docs/latest/api/app#appsetloginitemsettingssettings-macos-windows
For macOS we can use the
openAsHidden
flag ofapp.setLoginItemSettings
, but it only works on macOS non-MAS builds. However, we should be able to pass a custom argument to detect opening at startup and avoid creating the window.See https://www.electronjs.org/docs/latest/api/app#appsetloginitemsettingssettings-macos-windows
Eagerly waiting for a solution in windows.
For windows, you can create a shortcut to the application at C:\Users\{username}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\
. Windows supports defining launch arguments with shortcuts