You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-30Lines changed: 32 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,12 @@ The ASP.NET Core project is setup to run in development and production. In produ
14
14
Configure the YARP reverse proxy to match the Angular CLI URL. This is only required in development. I always use HTTPS in development and the port needs to match the Angular CLI developement env.
15
15
16
16
> [!IMPORTANT]
17
-
> In a real Angular project, the additional dev routes need to be added so that the __dev refresh__ works!
17
+
> In a real Angular project, the additional dev routes need to be added so that the **dev refresh** works!
18
18
19
19
```json
20
-
"UiDevServerUrl": "https://localhost:4201",
21
-
"ReverseProxy": {
20
+
{
21
+
"UiDevServerUrl": "https://localhost:4201",
22
+
"ReverseProxy": {
22
23
"Routes": {
23
24
"assets": {
24
25
"ClusterId": "cluster1",
@@ -79,14 +80,18 @@ Configure the YARP reverse proxy to match the Angular CLI URL. This is only requ
79
80
"Match": {
80
81
"Path": "/{nomatterwhat}.js.map"
81
82
}
83
+
},
84
+
"wellknown": {
85
+
"ClusterId": "cluster1",
86
+
"Match": {
87
+
"Path": ".well-known/{**catch-all}"
88
+
}
82
89
}
83
90
},
84
91
"Clusters": {
85
92
"cluster1": {
86
93
"HttpClient": {
87
-
"SslProtocols": [
88
-
"Tls12"
89
-
]
94
+
"SslProtocols": ["Tls12"]
90
95
},
91
96
"Destinations": {
92
97
"cluster1/destination1": {
@@ -96,52 +101,52 @@ Configure the YARP reverse proxy to match the Angular CLI URL. This is only requ
96
101
}
97
102
}
98
103
}
104
+
}
99
105
```
100
106
101
107
## Setup Angular CLI
102
108
103
-
Add the certificates to the CLI project for example in the **/certs** folder
109
+
Add the certificates to the CLI project for example in the **/certs** folder.
104
110
105
-
Update the Angular CLI angular.json file:
111
+
Update the Angular CLI `angular.json` file:
106
112
107
113
```json
114
+
...
108
115
"serve": {
109
-
"builder": "@angular/build:dev-server",
110
-
"options": {
111
-
"sslKey": "certs/dev_localhost.key",
112
-
"sslCert": "certs/dev_localhost.pem",
113
-
"port": 4201,
114
-
},
116
+
"builder": "@angular/build:dev-server",
117
+
"options": {
118
+
"sslKey": "certs/dev_localhost.key",
119
+
"sslCert": "certs/dev_localhost.pem",
120
+
"port": 4201
121
+
}
122
+
}
123
+
...
115
124
```
116
125
117
126
> [!NOTE]
118
127
> The default Angular setup uses port 4200, this needs to match the YARP reverse proxy settings for development.
119
128
120
-
Update the outputPath for the (angular cli build) to deploy the production paths to the wwwroot of the .NET project
129
+
Update the `outputPath` for the (Angular CLI build) to deploy the production paths to the `wwwroot` of the .NET project
121
130
122
131
```
123
-
"architect": {
132
+
"architect": {
124
133
"build": {
125
134
"builder": "@angular/build:application",
126
135
"options": {
127
-
"outputPath": {
136
+
"outputPath": {
128
137
"base": "../server/wwwroot",
129
138
"browser": ""
130
139
},
131
140
"browser": "src/main.ts",
132
-
"polyfills": [
133
-
"zone.js"
134
-
],
141
+
"polyfills": ["zone.js"],
135
142
"tsConfig": "tsconfig.app.json",
136
143
"assets": [
137
144
{
138
145
"glob": "**/*",
139
146
"input": "public"
140
147
}
141
148
],
142
-
"styles": [
143
-
"src/styles.css"
144
-
]
149
+
"styles": ["src/styles.css"]
145
150
},
146
151
```
147
152
@@ -219,7 +224,7 @@ Add the Azure App registration settings to the **appsettings.Development.json**
219
224
},
220
225
```
221
226
222
-
App Service (linux plan) configuration
227
+
App Service (linux plan) configuration
223
228
224
229
```
225
230
MicrosoftEntraID__Instance --your-value--
@@ -253,24 +258,22 @@ Or just open Visual Studio and run the solution.
253
258
Github actions is used for the DevOps. The build pipeline builds both the .NET project and the Angular CLI project using npm. The two projects are built in the same step because the UI project is built into the wwwroot of the server project.
0 commit comments