From 47643068b54d5c0c636faede12dbbbe3e582bbf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Denuzi=C3=A8re?= Date: Sun, 26 Nov 2023 09:11:40 +0100 Subject: [PATCH] feat: generate launchSettings ports --- .../.template.config/template.json | 40 +++++++++++++++++++ .../Properties/launchSettings.json | 6 +-- .../Properties/launchSettings.json | 8 ++-- 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/content/application/.template.config/template.json b/content/application/.template.config/template.json index f6d234d..5fc256e 100644 --- a/content/application/.template.config/template.json +++ b/content/application/.template.config/template.json @@ -103,6 +103,46 @@ {"condition": "(!nightly)", "value": ""} ] } + }, + "port_server": { + "type": "generated", + "generator": "port", + "replaces": "PORT_SERVER_HTTP", + "parameters": { + "low": "5000", + "high": "5049", + "fallback": "5000" + } + }, + "port_client": { + "type": "generated", + "generator": "port", + "replaces": "PORT_CLIENT_HTTP", + "parameters": { + "low": "5050", + "high": "5099", + "fallback": "5050" + } + }, + "port_server_ssl": { + "type": "generated", + "generator": "port", + "replaces": "PORT_SERVER_SSL", + "parameters": { + "low": "44300", + "high": "44349", + "fallback": "44320" + } + }, + "port_client_ssl": { + "type": "generated", + "generator": "port", + "replaces": "PORT_CLIENT_SSL", + "parameters": { + "low": "44350", + "high": "44399", + "fallback": "44360" + } } }, "sources": [ diff --git a/content/application/src/Bolero.Template.1.Client/Properties/launchSettings.json b/content/application/src/Bolero.Template.1.Client/Properties/launchSettings.json index 481b72c..e0d7387 100644 --- a/content/application/src/Bolero.Template.1.Client/Properties/launchSettings.json +++ b/content/application/src/Bolero.Template.1.Client/Properties/launchSettings.json @@ -3,8 +3,8 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:51066/", - "sslPort": 0 + "applicationUrl": "http://localhost:PORT_CLIENT_HTTP/", + "sslPort": PORT_CLIENT_SSL } }, "profiles": { @@ -20,7 +20,7 @@ "commandName": "Project", "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:51067/", + "applicationUrl": "http://localhost:PORT_CLIENT_HTTP/", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/content/application/src/Bolero.Template.1.Server/Properties/launchSettings.json b/content/application/src/Bolero.Template.1.Server/Properties/launchSettings.json index 2581432..7b7ea12 100644 --- a/content/application/src/Bolero.Template.1.Server/Properties/launchSettings.json +++ b/content/application/src/Bolero.Template.1.Server/Properties/launchSettings.json @@ -3,8 +3,8 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:6012", - "sslPort": 44334 + "applicationUrl": "http://localhost:PORT_SERVER_HTTP", + "sslPort": PORT_SERVER_SSL } }, "profiles": { @@ -19,8 +19,8 @@ "Server": { "commandName": "Project", "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:5001;http://localhost:5000", + "inspectUri": "{wsProtocol}://{url.hostname}:{url.prt}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "https://localhost:PORT_SERVER_SSL;http://localhost:PORT_SERVER_HTTP", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }