Running the same main process twice in one command line


My project requires me to run the same electron main process twice (or couple times) with different parameters. Right now I’m able to pass parameters from the console upon startup. In order to run my main process multiple times, I need to open up multiple terminals to do it. Is there a single command line way to make multiple startup work? thanks in advance


You could create a shell script that launches it twice?


Hmm…what kind of shell script? Any specific examples that I could refer to? Thx!


Something like:

# First launch
electron-app some parameters to parse

# Second launch
electron-app other arguments on this one

is what I was thinking, where electron-app is the name of the executable for your application.


Out of curiosity, why?

It seems like the kind of thing that could be handled by a single main process and two separate renderer processes. Maybe I’m being naive for assuming that, but I can’t see a reason to do that, especially if you also need to do this in production builds.