Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/spa-templates.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Calvarro Nelson <jacalvar@microsoft.com>2021-08-24 14:14:15 +0300
committerGitHub <noreply@github.com>2021-08-24 14:14:15 +0300
commit2057e764e766122320a95292dfaa76cbf47ae2d0 (patch)
tree7d61e96e48d397206f7555aed2f570aacac8a9f6
parentdc078f5b8efa3a2e6d92c40c8838326f7a1da940 (diff)
[SPA] Add support for a port range on the SPA proxy (#12)
Adds support for using a port range on Kestrel and the front-end SPA proxy
-rw-r--r--src/content/Angular-CSharp/.template.config/dotnetcli.host.json10
-rw-r--r--src/content/Angular-CSharp/.template.config/template.json89
-rw-r--r--src/content/React-CSharp/.template.config/dotnetcli.host.json10
-rw-r--r--src/content/React-CSharp/.template.config/template.json88
4 files changed, 171 insertions, 26 deletions
diff --git a/src/content/Angular-CSharp/.template.config/dotnetcli.host.json b/src/content/Angular-CSharp/.template.config/dotnetcli.host.json
index 1a247d9..63792e4 100644
--- a/src/content/Angular-CSharp/.template.config/dotnetcli.host.json
+++ b/src/content/Angular-CSharp/.template.config/dotnetcli.host.json
@@ -7,10 +7,16 @@
"Framework": {
"longName": "framework"
},
- "HttpPort": {
+ "kestrelHttpPort": {
"isHidden": true
},
- "HttpsPort": {
+ "kestrelHttpsPort": {
+ "isHidden": true
+ },
+ "iisHttpPort": {
+ "isHidden": true
+ },
+ "iisHttpsPort": {
"isHidden": true
},
"ExcludeLaunchSettings": {
diff --git a/src/content/Angular-CSharp/.template.config/template.json b/src/content/Angular-CSharp/.template.config/template.json
index 1302b3f..94d7e28 100644
--- a/src/content/Angular-CSharp/.template.config/template.json
+++ b/src/content/Angular-CSharp/.template.config/template.json
@@ -113,30 +113,75 @@
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
},
- "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 IndividualLocalAuth 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": {
@@ -144,15 +189,37 @@
"high": 44399
}
},
- "HttpsPortReplacer": {
+ "iisHttpsPortReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
- "sourceVariableName": "HttpsPort",
- "fallbackVariableName": "HttpsPortGenerated"
+ "sourceVariableName": "iisHttpsPort",
+ "fallbackVariableName": "iisHttpsPortGenerated"
},
"replaces": "44300"
},
+ "ProxyPort": {
+ "type": "parameter",
+ "datatype": "integer",
+ "description": "Port number to use for the SPA front-end development proxy."
+ },
+ "ProxyPortGenerated": {
+ "type": "generated",
+ "generator": "port",
+ "parameters": {
+ "low": 44400,
+ "high": 44499
+ }
+ },
+ "ProxyPortReplacer": {
+ "type": "generated",
+ "generator": "coalesce",
+ "parameters": {
+ "sourceVariableName": "ProxyPort",
+ "fallbackVariableName": "ProxyPortGenerated"
+ },
+ "replaces": "5002"
+ },
"IndividualLocalAuth": {
"type": "computed",
"value": "(auth == \"Individual\")"
diff --git a/src/content/React-CSharp/.template.config/dotnetcli.host.json b/src/content/React-CSharp/.template.config/dotnetcli.host.json
index 1a247d9..63792e4 100644
--- a/src/content/React-CSharp/.template.config/dotnetcli.host.json
+++ b/src/content/React-CSharp/.template.config/dotnetcli.host.json
@@ -7,10 +7,16 @@
"Framework": {
"longName": "framework"
},
- "HttpPort": {
+ "kestrelHttpPort": {
"isHidden": true
},
- "HttpsPort": {
+ "kestrelHttpsPort": {
+ "isHidden": true
+ },
+ "iisHttpPort": {
+ "isHidden": true
+ },
+ "iisHttpsPort": {
"isHidden": true
},
"ExcludeLaunchSettings": {
diff --git a/src/content/React-CSharp/.template.config/template.json b/src/content/React-CSharp/.template.config/template.json
index 0d47ffb..5fcab90 100644
--- a/src/content/React-CSharp/.template.config/template.json
+++ b/src/content/React-CSharp/.template.config/template.json
@@ -115,30 +115,74 @@
"description": "If specified, skips the automatic restore of the project on create.",
"defaultValue": "false"
},
- "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 IndividualLocalAuth 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": {
@@ -146,15 +190,37 @@
"high": 44399
}
},
- "HttpsPortReplacer": {
+ "iisHttpsPortReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
- "sourceVariableName": "HttpsPort",
- "fallbackVariableName": "HttpsPortGenerated"
+ "sourceVariableName": "iisHttpsPort",
+ "fallbackVariableName": "iisHttpsPortGenerated"
},
"replaces": "44300"
},
+ "ProxyPort": {
+ "type": "parameter",
+ "datatype": "integer",
+ "description": "Port number to use for the SPA front-end development proxy."
+ },
+ "ProxyPortGenerated": {
+ "type": "generated",
+ "generator": "port",
+ "parameters": {
+ "low": 44400,
+ "high": 44499
+ }
+ },
+ "ProxyPortReplacer": {
+ "type": "generated",
+ "generator": "coalesce",
+ "parameters": {
+ "sourceVariableName": "ProxyPort",
+ "fallbackVariableName": "ProxyPortGenerated"
+ },
+ "replaces": "5002"
+ },
"IndividualLocalAuth": {
"type": "computed",
"value": "(auth == \"Individual\")"