parent
1d8da2161f
commit
3fbdb2e46c
@ -48,6 +48,7 @@ OPTIONS
|
|||||||
-v, --version show CLI version
|
-v, --version show CLI version
|
||||||
--cert=cert
|
--cert=cert
|
||||||
--cert-key=cert-key
|
--cert-key=cert-key
|
||||||
|
--password=password
|
||||||
--help show CLI help
|
--help show CLI help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ export class Entry extends Command {
|
|||||||
version: flags.version({ char: "v" }),
|
version: flags.version({ char: "v" }),
|
||||||
"no-auth": flags.boolean({ default: false }),
|
"no-auth": flags.boolean({ default: false }),
|
||||||
"allow-http": flags.boolean({ default: false }),
|
"allow-http": flags.boolean({ default: false }),
|
||||||
|
password: flags.string(),
|
||||||
|
|
||||||
// Dev flags
|
// Dev flags
|
||||||
"bootstrap-fork": flags.string({ hidden: true }),
|
"bootstrap-fork": flags.string({ hidden: true }),
|
||||||
@ -132,13 +133,17 @@ export class Entry extends Command {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const passwordLength = 12;
|
let password = flags["password"];
|
||||||
const possible = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
if (!password) {
|
||||||
const chars = [];
|
// Generate a random password
|
||||||
for (let i = 0; i < passwordLength; i++) {
|
const passwordLength = 12;
|
||||||
chars.push(possible[Math.floor(Math.random() * possible.length)]);
|
const possible = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
|
const chars = [];
|
||||||
|
for (let i = 0; i < passwordLength; i++) {
|
||||||
|
chars.push(possible[Math.floor(Math.random() * possible.length)]);
|
||||||
|
}
|
||||||
|
password = chars.join("");
|
||||||
}
|
}
|
||||||
const password = chars.join("");
|
|
||||||
|
|
||||||
const hasCustomHttps = certData && certKeyData;
|
const hasCustomHttps = certData && certKeyData;
|
||||||
const app = await createApp({
|
const app = await createApp({
|
||||||
|
Loading…
Reference in New Issue
Block a user