From 3c76399cd0a28be6a0d4ddf9003633db56498552 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Mon, 15 Sep 2014 12:37:05 -0700 Subject: [PATCH] Added '--public' and '--private' options --- src/command-line/start.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/command-line/start.js b/src/command-line/start.js index 2c97f4a8..e8ba0e19 100644 --- a/src/command-line/start.js +++ b/src/command-line/start.js @@ -6,6 +6,8 @@ var shout = require("../server"); program .option("-h, --host ", "host") .option("-p, --port ", "port") + .option(" --public") + .option(" --private") .command("start") .description("Start the server") .action(function() { @@ -18,6 +20,12 @@ program } else { var host = program.host || process.env.IP || config.host; var port = program.port || process.env.PORT || config.port; - shout(port, host, config.public); + var mode = config.public; + if (program.public) { + mode = true; + } else if (program.private) { + mode = false; + } + shout(port, host, mode); } });