mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 12:33:07 +00:00
Added '--public' and '--private' options
This commit is contained in:
parent
a18580645c
commit
3c76399cd0
1 changed files with 9 additions and 1 deletions
|
@ -6,6 +6,8 @@ var shout = require("../server");
|
|||
program
|
||||
.option("-h, --host <ip>", "host")
|
||||
.option("-p, --port <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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue