diff --git a/.gitignore b/.gitignore index 1b7c1de..520ff30 100644 --- a/.gitignore +++ b/.gitignore @@ -50,5 +50,6 @@ coins # Ignore all EasyDEX-GUI subfolder files, except README EasyDEX-GUI +Iguana-GUI #EasyDEX-GUI/* #!EasyDEX-GUI/README \ No newline at end of file diff --git a/main.js b/main.js index f4fd0fd..45f8370 100644 --- a/main.js +++ b/main.js @@ -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() diff --git a/package.json b/package.json index 231d233..3ff5de8 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "electron": "^1.4.1" }, "dependencies": { + "express": "^4.14.0", "jquery": "^2.2.4", "mkdirp": "^0.5.1", "toastr": "^2.1.2"