this is so the main process can spin up and spin down different servers with different config as required.
PS: @mixmix couldn't this still be done in a main process? Or maybe not, because the client muxrpc might have to re-establish the connection with the server. I'm trying to understand the use case of headless renderer processes.
@mixmix Oh wow I just learned something, and now I'm trying to make up my mind whether that file is horrifying (document.documentElement.querySelector('head')
alongside require('fs')
... inside a big template string) or inspiring.
I think "renderer" process is just what electron calls anything that's not the main process right?
Here's what it looks like in ssb-ahoy
(this pattern copied from Matt's work in Patchwork) : https://github.com/ssbc/ssb-ahoy/blob/master/electron/process/server.js
you just tell it to show: false
and BOOM, headless server thang.
p.s. I'm probably about to try refactoring out that executeJavascript
thing ... we've got emerging needs for a different workflow with webpack dev-servers and Vue. Going to use the loadURL
method...
cc @andré
Show whole feed