main: fix default app address and wrong settings calls

This commit is contained in:
jean-emmanuel 2016-09-30 14:14:05 +02:00
parent 18e6a3d4de
commit fdf94213a2
3 changed files with 4 additions and 3 deletions

View file

@ -2,8 +2,9 @@ var path = require('path'),
shortcut = require('electron-localshortcut'),
{app, BrowserWindow, dialog} = require('electron'),
settings = require('./settings'),
address = 'http://' + settings.read('address') || settings.read('appAddresses')[0]
address = settings.read('address')? 'http://' + settings.read('address') : settings.read('appAddresses')[0]
console.log(address)
dialog.showErrorBox = function(title,err) {
console.log(title + ': ' + err)
}

View file

@ -7,7 +7,7 @@ var express = require('express')(),
ioWildcard = require('socketio-wildcard')(),
ipc = {},
settings = require('./settings'),
appAddresses = settings.appAddresses
appAddresses = settings.read('appAddresses')
express.get('/', function(req, res){
res.sendFile(path.resolve(__dirname + '/../browser/index.html'))

View file

@ -15,7 +15,7 @@ Options:
-p, --port http port of the app\'s server (default to 8080)
-n, --nogui disable default gui
-g, --gui-only only launch the gui (a server instance must be running)
-a, --address app\'s ip:port (for gui-only mode, default to localhost:8080
-a, --address app\'s ip:port (for gui-only mode, default to localhost:8080)
-l, --load session file to load
-t, --theme theme name or path (mutliple values allowed)