|
|
@ -8,6 +8,20 @@ const BrowserWindow = electron.BrowserWindow |
|
|
|
var fs = require('fs'); |
|
|
|
var mkdirp = require('mkdirp'); |
|
|
|
|
|
|
|
// GUI APP settings and starting gui on address http://120.0.0.1:77777
|
|
|
|
var express = require('express') |
|
|
|
var guiapp = express() |
|
|
|
|
|
|
|
guiapp.use('/gui', express.static('gui')) |
|
|
|
|
|
|
|
guiapp.get('/', function (req, res) { |
|
|
|
res.send('Hello World!') |
|
|
|
}) |
|
|
|
|
|
|
|
var rungui = guiapp.listen(77777, function () { |
|
|
|
console.log('Example guiapp listening on port 77777!') |
|
|
|
}) |
|
|
|
// END GUI App Settings
|
|
|
|
|
|
|
|
const path = require('path') |
|
|
|
const url = require('url') |
|
|
@ -52,11 +66,12 @@ function createWindow () { |
|
|
|
mainWindow = new BrowserWindow({width: 800, height: 600}) |
|
|
|
|
|
|
|
// load our index.html (i.e. easyDEX GUI)
|
|
|
|
mainWindow.loadURL(url.format({ |
|
|
|
mainWindow.loadURL('http://localhost:77777/gui/EasyDEX-GUI/'); |
|
|
|
/*mainWindow.loadURL(url.format({ |
|
|
|
pathname: path.join(__dirname, 'EasyDEX-GUI/index.html'), |
|
|
|
protocol: 'file:', |
|
|
|
slashes: true |
|
|
|
})) |
|
|
|
}))*/ |
|
|
|
|
|
|
|
// DEVTOOLS - only for dev purposes - ca333
|
|
|
|
mainWindow.webContents.openDevTools() |
|
|
|