Control (start/stop) a background server on Electron



So, I’m planning to host a web app with a node server. This node server will be running in the background of an electron app. Is there a way to control this (start/stop) server from the main window with a button?

Thanks in advance!