diff --git a/src/server/boot.ts b/src/server/boot.ts index c94af6c9..7b2b84f9 100644 --- a/src/server/boot.ts +++ b/src/server/boot.ts @@ -9,8 +9,10 @@ export async function startServer( if (!opts.onListen) { opts.onListen = (params) => { const pathname = opts.basePath + "/"; + const https = !!(opts.key && opts.cert); + const protocol = https ? "https:" : "http:"; const address = colors.cyan( - `http://localhost:${params.port}${pathname}`, + `${protocol}//localhost:${params.port}${pathname}`, ); const localLabel = colors.bold("Local:");