shmuli shmuli - 1 year ago 85
Node.js Question

Hiding the 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 Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download