From 41c7d98b7bd0da21ef8a8836b226ba5aed838ed8 Mon Sep 17 00:00:00 2001 From: John McCambridge Date: Tue, 23 Apr 2019 16:38:34 -0500 Subject: [PATCH] Offer https/http url based on schema (#572) * Let people know when telemetry is disabled, change url to https if secure connection * Remove --no-auth as a http candidate * Rename variable, change let to const --- packages/server/src/cli.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts index 9d91b672..42ef342f 100644 --- a/packages/server/src/cli.ts +++ b/packages/server/src/cli.ts @@ -310,8 +310,12 @@ const bold = (text: string | number): string | number => { } else { logger.warn("Launched without authentication."); } + if (options.disableTelemetry) { + logger.info("Telemetry is disabled"); + } - const url = `http://localhost:${options.port}/`; + const protocol = options.allowHttp ? "http" : "https"; + const url = `${protocol}://localhost:${options.port}/`; logger.info(" "); logger.info("Started (click the link below to open):"); logger.info(url);