shmuli shmuli - 21 days ago 5
Node.js Question

Hiding the Electron.io program window

I'm developing a Node.js app on Electron so it can be distributed and run by people who won't be using the command line. The app doesn't need an interface, it just needs to be executed. Is there a way to hide the electron window, so the app can just sit in the tray and can be opened/quit?

Answer

There a show option in the BrowserWindow options. By default it's true, but by turning it off (show: false) you will hide the window, so the app runs, but there's no visible Window.

From Docs:

show Boolean (optional) - Whether window should be shown when created. Default is true.