Skip to content

Commit

Permalink
.net 8 react update ch24
Browse files Browse the repository at this point in the history
  • Loading branch information
christiannagel committed Jun 15, 2024
1 parent 23edb8f commit 80fdf44
Show file tree
Hide file tree
Showing 8 changed files with 4,784 additions and 3,284 deletions.
2 changes: 1 addition & 1 deletion 3_Web/ASPNETCore/ReactSample/ClientApp/.env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PORT=44481
PORT=44487
HTTPS=true

2 changes: 1 addition & 1 deletion 3_Web/ASPNETCore/ReactSample/ClientApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,7 @@ npm install -g serve
serve -s build
```
The last command shown above will serve your static site on the port **5037**. Like many of [serve](https://github.com/zeit/serve)’s internal settings, the port can be adjusted using the `-p` or `--port` flags.
The last command shown above will serve your static site on the port **5022**. Like many of [serve](https://github.com/zeit/serve)’s internal settings, the port can be adjusted using the `-p` or `--port` flags.
Run this command to get a full list of the options available:
Expand Down
7,993 changes: 4,735 additions & 3,258 deletions 3_Web/ASPNETCore/ReactSample/ClientApp/package-lock.json

Large diffs are not rendered by default.

34 changes: 16 additions & 18 deletions 3_Web/ASPNETCore/ReactSample/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"bootstrap": "^5.2.0",
"bootstrap": "^5.2.3",
"http-proxy-middleware": "^2.0.6",
"jquery": "^3.6.0",
"jquery": "^3.6.4",
"merge": "^2.1.1",
"oidc-client": "^1.11.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-bootstrap": "^0.26.2",
"react-router-dom": "^6.3.0",
"react-router-dom": "^6.11.0",
"react-scripts": "^5.0.1",
"reactstrap": "^9.1.3",
"rimraf": "^3.0.2",
"web-vitals": "^2.1.4",
"reactstrap": "^9.1.9",
"rimraf": "^5.0.0",
"web-vitals": "^3.3.1",
"workbox-background-sync": "^6.5.4",
"workbox-broadcast-update": "^6.5.4",
"workbox-cacheable-response": "^6.5.4",
Expand All @@ -30,23 +30,21 @@
"workbox-streams": "^6.5.4"
},
"devDependencies": {
"ajv": "^8.11.0",
"ajv": "^8.12.0",
"cross-env": "^7.0.3",
"eslint": "^8.22.0",
"eslint": "^8.39.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-react": "^7.30.1",
"nan": "^2.16.0",
"typescript": "^4.7.4"
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"nan": "^2.17.0",
"typescript": "^4.9.5"
},
"overrides": {
"autoprefixer": "10.4.5"
},
"resolutions": {
"css-what": "^5.0.1",
"nth-check": "^3.0.1"
"autoprefixer": "10.4.5",
"nth-check": "2.1.1",
"webpack": "5.81.0"
},
"scripts": {
"prestart": "node aspnetcore-https && node aspnetcore-react",
Expand Down
3 changes: 2 additions & 1 deletion 3_Web/ASPNETCore/ReactSample/ClientApp/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { createProxyMiddleware } = require('http-proxy-middleware');
const { env } = require('process');

const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` :
env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:15140';
env.ASPNETCORE_URLS ? env.ASPNETCORE_URLS.split(';')[0] : 'http://localhost:41112';

const context = [
"/weatherforecast",
Expand All @@ -14,6 +14,7 @@ const onError = (err, req, resp, target) => {

module.exports = function (app) {
const appProxy = createProxyMiddleware(context, {
proxyTimeout: 10000,
target: target,
// Handle errors to prevent the proxy middleware from crashing when
// the ASP NET Core webserver is unavailable
Expand Down
6 changes: 3 additions & 3 deletions 3_Web/ASPNETCore/ReactSample/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:15140",
"sslPort": 44394
"applicationUrl": "http://localhost:41112",
"sslPort": 44321
}
},
"profiles": {
"ReactSample": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:7081;http://localhost:5037",
"applicationUrl": "https://localhost:7015;http://localhost:5022",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
Expand Down
4 changes: 2 additions & 2 deletions 3_Web/ASPNETCore/ReactSample/ReactSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<SpaProxyServerUrl>https://localhost:44481</SpaProxyServerUrl>
<SpaProxyServerUrl>https://localhost:44487</SpaProxyServerUrl>
<SpaProxyLaunchCommand>npm start</SpaProxyLaunchCommand>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="7.0.18" />
</ItemGroup>

<ItemGroup>
Expand Down
24 changes: 24 additions & 0 deletions 3_Web/ASPNETCore/ReactSample/ReactSample.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35005.142
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactSample", "ReactSample.csproj", "{436523DB-21ED-4927-AF8E-5C4A58CD8ACC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{436523DB-21ED-4927-AF8E-5C4A58CD8ACC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{436523DB-21ED-4927-AF8E-5C4A58CD8ACC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{436523DB-21ED-4927-AF8E-5C4A58CD8ACC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{436523DB-21ED-4927-AF8E-5C4A58CD8ACC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1CF74DAF-A07B-4ED4-A37B-55A089F68E67}
EndGlobalSection
EndGlobal

0 comments on commit 80fdf44

Please sign in to comment.