title: Electron build app doesnt start express server
body: <p>I'm building an app and all works fine while I'm in developer mode. Everythink works as it should. But when I package my app with electron-builder, app opens but it doesnt start express server and app doesnt work properly. </p>
  
  <p>Here is my package.json code</p>
  
  <pre><code>{
    "name": "artros",
    "version": "1.0.0",
    "description": "Artros",
    "author": "MC3",
    "license": "ISC",
    "main": "start.js",
    "scripts": {
          "pack": "build --dir",
          "dist": "build"
      },
      "build": {
          "appId": "com.artros.app",
          "productName": "Artros",
          "win": {
              "target": "portable",
              "icon": "build/icon.ico"
          },
          "mac": {
              "target": "dmg"
          }
      },
    "dependencies": {
      "body-parser": "^1.18.3",
      "ejs": "^2.5.7",
      "electron-pdf-window": "^1.0.12",
      "express": "^4.16.2",
      "multer": "^1.3.0",
      "nodemailer": "^4.6.4",
      "path": "^0.12.7"
    },
      "devDependencies": {
          "electron": "^1.8.2"
      }
  }
  </code></pre>
  
  <p>and here is my start.js code</p>
  
  <pre><code> const cluster = require('cluster');
      if (cluster.isMaster) {
        require('./main.js'); // your electron main file
        cluster.fork(); 
      } else {
        require('./app.js'); // your server code
      }
  </code></pre>
  
  <p>and my main.js code</p>
  
  <pre><code>var electron = require('electron');
  var browserWindow = electron.BrowserWindow;
  var app = electron.app;
  
  app.on('ready', function(){
      var appWindow;
  
  //appWindow
      appWindow = new browserWindow({
          width:1120,
          height:620,
          webPreferences: {
              plugins: true
          },
          icon: __dirname + '/public/icon/icon.png' 
      });
      appWindow.loadURL('file://' +__dirname + '/public/prva.html');
  
      //appWindow.webContents.openDevTools();
  });
  
  // close app after all windows are closed
      app.on('window-all-closed', () =&gt; {
    app.quit()
  })
  </code></pre>
  
  <p>If anybody has any idea what is the problem, please post it. Thanks</p>