electron build

This commit is contained in:
Jan Prochazka
2019-12-25 19:28:51 +01:00
parent beaeac77a0
commit eaf9679740
6 changed files with 451 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
const net = require('net');
const port = process.env.PORT ? (process.env.PORT - 100) : 3000;
const port = 5000;
process.env.ELECTRON_START_URL = `http://localhost:${port}`;
@@ -12,7 +12,7 @@ const tryConnection = () => client.connect({port: port}, () => {
console.log('starting electron');
startedElectron = true;
const exec = require('child_process').exec;
const electron = exec('npm run electron');
const electron = exec('yarn electron');
electron.stdout.on("data", function(data) {
console.log("stdout: " + data.toString());
});

View File

@@ -26,7 +26,7 @@ function createWindow() {
// mainWindow.loadURL('http://localhost:3000');
// Open the DevTools.
mainWindow.webContents.openDevTools();
// mainWindow.webContents.openDevTools();
// Emitted when the window is closed.
mainWindow.on('closed', function () {