diff options
author | Damian Edwards <damian@damianedwards.com> | 2021-07-21 20:36:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-21 20:36:31 +0300 |
commit | 2cab4e79eef163b43438ab4bed7bc7198be8e097 (patch) | |
tree | 1475123e401199f6ab5a0c8ec5306a3de020dfa8 /src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp | |
parent | 29c7fe687b248b1ab88a732d683679df960785fc (diff) |
Update web templates to use port range for Kestrel (#34410)
Updated web project templates to use port range for Kestrel.
Selected 5000-5300 for HTTP and 7000-7300 for HTTPS.
Note 6000 is reserved (see https://github.com/dotnet/templating/blob/94b1e0839ab49026b3ff654f2b5e5e1a1b4b2c53/src/Microsoft.TemplateEngine.Orchestrator.RunnableProjects/Macros/Config/GeneratePortNumberConfig.cs#L19).
Diffstat (limited to 'src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp')
2 files changed, 63 insertions, 13 deletions
diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/dotnetcli.host.json index 6ac35c7a98..007769ba46 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/dotnetcli.host.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/dotnetcli.host.json @@ -1,10 +1,16 @@ { "$schema": "http://json.schemastore.org/dotnetcli.host", "symbolInfo": { - "HttpPort": { + "kestrelHttpPort": { "isHidden": true }, - "HttpsPort": { + "kestrelHttpsPort": { + "isHidden": true + }, + "iisHttpPort": { + "isHidden": true + }, + "iisHttpsPort": { "isHidden": true }, "ExcludeLaunchSettings": { diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json index f96596abfb..6ffb6d864b 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-FSharp/.template.config/template.json @@ -36,30 +36,74 @@ "defaultValue": "false", "description": "Whether to exclude launchSettings.json from the generated template." }, - "HttpPort": { + "kestrelHttpPort": { "type": "parameter", "datatype": "integer", "description": "Port number to use for the HTTP endpoint in launchSettings.json." }, - "HttpPortGenerated": { + "kestrelHttpPortGenerated": { + "type": "generated", + "generator": "port", + "parameters": { + "low": 5000, + "high": 5300 + } + }, + "kestrelHttpPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "kestrelHttpPort", + "fallbackVariableName": "kestrelHttpPortGenerated" + }, + "replaces": "5000" + }, + "kestrelHttpsPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)." + }, + "kestrelHttpsPortGenerated": { + "type": "generated", + "generator": "port", + "parameters": { + "low": 7000, + "high": 7300 + } + }, + "kestrelHttpsPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "kestrelHttpsPort", + "fallbackVariableName": "kestrelHttpsPortGenerated" + }, + "replaces": "5001" + }, + "iisHttpPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json." + }, + "iisHttpPortGenerated": { "type": "generated", "generator": "port" }, - "HttpPortReplacer": { + "iisHttpPortReplacer": { "type": "generated", "generator": "coalesce", "parameters": { - "sourceVariableName": "HttpPort", - "fallbackVariableName": "HttpPortGenerated" + "sourceVariableName": "iisHttpPort", + "fallbackVariableName": "iisHttpPortGenerated" }, "replaces": "8080" }, - "HttpsPort": { + "iisHttpsPort": { "type": "parameter", "datatype": "integer", - "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)." + "description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)." }, - "HttpsPortGenerated": { + "iisHttpsPortGenerated": { "type": "generated", "generator": "port", "parameters": { @@ -67,12 +111,12 @@ "high": 44399 } }, - "HttpsPortReplacer": { + "iisHttpsPortReplacer": { "type": "generated", "generator": "coalesce", "parameters": { - "sourceVariableName": "HttpsPort", - "fallbackVariableName": "HttpsPortGenerated" + "sourceVariableName": "iisHttpsPort", + "fallbackVariableName": "iisHttpsPortGenerated" }, "replaces": "44300" }, |