diff --git a/server/common-cli-options.js b/server/common-cli-options.js index ab59bc94..230af8bf 100644 --- a/server/common-cli-options.js +++ b/server/common-cli-options.js @@ -32,9 +32,10 @@ "use strict"; exports.options = [ - { option: 'port', alias: 'p', type: 'Int', description: 'port. Default 18679'}, - { option: 'dns', type: 'Boolean', description: 'enable dns server'}, - { option: 'address', type: 'String', description: 'ip address for dns and controller url conversion'}, - { option: 'app-mode', type: 'Boolean', description: 'run as an app'}, + { option: 'port', alias: 'p', type: 'Int', description: 'port. Default 18679'}, + { option: 'dns', type: 'Boolean', description: 'enable dns server'}, + { option: 'address', type: 'String', description: 'ip address for dns and controller url conversion'}, + { option: 'app-mode', type: 'Boolean', description: 'run as an app'}, + { option: 'show', type: 'String', description: 'html file to launch, default "games"'}, ]; diff --git a/server/server.js b/server/server.js index e288da96..dd375131 100644 --- a/server/server.js +++ b/server/server.js @@ -136,8 +136,9 @@ var launchBrowser = function(err) { }; var p; - if (args.appMode) { - p = browser.launch("http://localhost:" + server.getSettings().port + "/games.html", config.getConfig().preferredBrowser); + if (args.appMode || args.show) { + var name = args.show || "games"; + p = browser.launch("http://localhost:" + server.getSettings().port + "/" + name + ".html", config.getConfig().preferredBrowser); } else { p = Promise.resolve(); }