diff --git a/src/command-line/start.js b/src/command-line/start.js index 1f3b990c..9a5fdbbd 100644 --- a/src/command-line/start.js +++ b/src/command-line/start.js @@ -7,20 +7,20 @@ var server = require("../server"); var Helper = require("../helper"); program + .command("start") .option("-H, --host ", "host") .option("-P, --port ", "port") .option("-B, --bind ", "bind") .option(" --public", "mode") .option(" --private", "mode") - .command("start") .description("Start the server") - .action(function() { + .action(function(options) { var users = new ClientManager().getUsers(); var mode = Helper.config.public; - if (program.public) { + if (options.public) { mode = true; - } else if (program.private) { + } else if (options.private) { mode = false; } @@ -31,9 +31,9 @@ program return; } - Helper.config.host = program.host || Helper.config.host; - Helper.config.port = program.port || Helper.config.port; - Helper.config.bind = program.bind || Helper.config.bind; + Helper.config.host = options.host || Helper.config.host; + Helper.config.port = options.port || Helper.config.port; + Helper.config.bind = options.bind || Helper.config.bind; Helper.config.public = mode; server();