Browse Source

added corsproxy to app

added corsproxy to start on Linux and OSX platform.
ca333-dev
Satinder Grewal 8 years ago
parent
commit
2b3cd02157
  1. 4
      main.js
  2. 3
      package.json

4
main.js

@ -109,10 +109,12 @@ function createLoadingWindow() {
if (os.platform() === 'linux') {
process.chdir(iguanaDir);
ig = spawn(iguanaLinux);
corsproxy_process = spawn('corsproxy');
}
if (os.platform() === 'darwin') {
process.chdir(iguanaDir);
ig = spawn(iguanaOSX);
corsproxy_process = spawn('corsproxy');
}
if (os.platform() !== 'win32') { ig.stderr.on( 'error: ', data => { console.log( `stderr: ${data}` ); }); }
@ -133,7 +135,7 @@ function createWindow (status) {
// if window closed we kill iguana proc
mainWindow.on('closed', function () {
if (os.platform() !== 'win32') { ig.kill(); }
if (os.platform() !== 'win32') { ig.kill(); corsproxy_process.kill(); }
if (os.platform() === 'win32') {
exec('TASKKILL /F /IM iguana.exe /T', {cwd: iguanaDir});
}

3
package.json

@ -24,6 +24,7 @@
"dependencies": {
"express": "^4.14.0",
"fs-extra": "^1.0.0",
"mkdirp": "^0.5.1"
"mkdirp": "^0.5.1",
"corsproxy": "^1.5.0"
}
}

Loading…
Cancel
Save