title: How to run an electron app with arguments?
body: <p>My app is electron with a <code>BrowserWindow</code> loading a local page index.html.<br>
  I call <code>npm run start</code> a script to run <code>electron main.js</code> , the app opens and the html loaded.<br>
  Can I add an argument to the script that will load different html file into the <code>BrowserWindow</code> ?  </p>
  
  <p>In the main.js file the code is :</p>
  
  <pre class="lang-js prettyprint-override"><code>function createWindow () {
    // Create the browser window.
    mainWindow = new BrowserWindow({
      webPreferences:{
        webSecurity:false
      },
      fullscreen : false });//, alwaysOnTop : true , kiosk : true })
    mainWindow.setMenu(null);
    // and load the index.html of the app.
    let url = `file://${__dirname}/index.html`; \\ index.html should be determined by argument passed at start.  
    mainWindow.loadURL(url,loadOptions);
  
    // Open the DevTools.
    mainWindow.webContents.openDevTools();
  
    // Emitted when the window is closed.
    mainWindow.on('closed', function () {
      // Dereference the window object, usually you would store windows
      // in an array if your app supports multi windows, this is the time
      // when you should delete the corresponding element.
      mainWindow = null;
    });
  }
  </code></pre>