mirror of https://git.tuxpa.in/a/code-server.git
chore(cli): export defaultConfigFile + add JSDoc
This commit is contained in:
parent
82d93186f8
commit
fb2625dbe8
|
@ -502,7 +502,17 @@ export async function setDefaults(cliArgs: Args, configArgs?: ConfigArgs): Promi
|
|||
} as DefaultedArgs // TODO: Technically no guarantee this is fulfilled.
|
||||
}
|
||||
|
||||
async function defaultConfigFile(): Promise<string> {
|
||||
/**
|
||||
* Helper function to return the default config file.
|
||||
*
|
||||
* @returns The default config file:
|
||||
*
|
||||
* - bind-addr: 127.0.0.1:8080
|
||||
* - auth: password
|
||||
* - password: <generated-password>
|
||||
* - cert: false
|
||||
*/
|
||||
export async function defaultConfigFile(): Promise<string> {
|
||||
return `bind-addr: 127.0.0.1:8080
|
||||
auth: password
|
||||
password: ${await generatePassword()}
|
||||
|
|
Loading…
Reference in New Issue