We\'re using electron-packager to bundle up and distribute the front-end of our web application. We need to be able to pass in the host and port of
I recommend you to use a command line arguments management system like "minimist" for example.
You can use this in your json : "start": "electron . --srv=server.com --prt=112 --arg3=myarg3"
In your main.js you can use this :
var args = require('minimist')(process.argv);
console.log(args)
and you can use your args in the main javascript file.
For the Package, you can do the same thing but in the shortcut, by adding myapp.exe --srv=server.com --prt=112 --arg3=myarg3