45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
"use strict";
|
|
|
|
const yargs = require("yargs");
|
|
|
|
module.exports = () =>
|
|
yargs
|
|
.scriptName("oasis")
|
|
.env("OASIS")
|
|
.help("h")
|
|
.alias("h", "help")
|
|
.usage("Usage: $0 [options]")
|
|
.options("open", {
|
|
describe:
|
|
"Automatically open app in web browser. Use --no-open to disable.",
|
|
default: true,
|
|
type: "boolean"
|
|
})
|
|
.options("offline", {
|
|
describe:
|
|
"Don't try to connect to scuttlebutt peers or pubs. This can be changed on the 'settings' page while Oasis is running.",
|
|
default: false,
|
|
type: "boolean"
|
|
})
|
|
.options("host", {
|
|
describe: "Hostname for web app to listen on",
|
|
default: "localhost",
|
|
type: "string"
|
|
})
|
|
.options("port", {
|
|
describe: "Port for web app to listen on",
|
|
default: 3000,
|
|
type: "number"
|
|
})
|
|
.options("public", {
|
|
describe:
|
|
"Assume Oasis is being hosted publicly, disable HTTP POST and redact messages from people who haven't given consent for public web hosting.",
|
|
default: false,
|
|
type: "boolean"
|
|
})
|
|
.options("debug", {
|
|
describe: "Use verbose output for debugging",
|
|
default: false,
|
|
type: "boolean"
|
|
}).argv;
|