From dd7ce651c198a7665fce95c6c8e77a30de79fd02 Mon Sep 17 00:00:00 2001 From: pbca26 Date: Tue, 11 Apr 2017 18:21:11 +0300 Subject: [PATCH] v2 dev only switch #2 --- main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index ef3113e..666b242 100644 --- a/main.js +++ b/main.js @@ -70,7 +70,7 @@ if (appConfig.killIguanaOnStart) { } guiapp.use(function(req, res, next) { - res.header('Access-Control-Allow-Origin', appConfig.dev ? '*' : 'http://127.0.0.1:' + appConfig.iguanaAppPort); + res.header('Access-Control-Allow-Origin', appConfig.dev ? '*' : 'http://127.0.0.1:3000'); res.header('Access-Control-Allow-Headers', 'X-Requested-With'); res.header('Access-Control-Allow-Credentials', 'true'); res.header('Access-Control-Allow-Headers', 'Content-Type'); @@ -306,7 +306,11 @@ function createWindow (status) { // load our index.html (i.e. easyDEX GUI) if (appConfig.edexGuiOnly) { - mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/EasyDEX-GUI/'); + if (appConfig.v2) { + mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/EasyDEX-GUI/react/build'); + } else { + mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/EasyDEX-GUI/'); + } } else { mainWindow.loadURL('http://' + appConfig.host + ':' + appConfig.iguanaAppPort + '/gui/main.html'); }