Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bc03732
EC-1107 Implement SSR
Mar 17, 2026
41798d5
EC-1107 Server Side Rendering
Mar 24, 2026
8a4d31f
EC-1107 Fix Tests
Mar 25, 2026
4ac6603
EC-1107 Fix Encryption Issue
Mar 25, 2026
0ae2b5f
EC-1107 Upgrade Framework
Mar 25, 2026
c341067
EC-1107 Fix Tests
Mar 25, 2026
b18d06d
EC-1107 Disable SSR During TESTS
Mar 25, 2026
5b402cf
Fix Tests
Mar 27, 2026
897fe25
EC-1107 Update Docker Image For Functional Tests
Mar 27, 2026
8694cf6
EC-1197 Fix Failing Tests
Mar 31, 2026
17c916b
EC-1197 Fix Failing Tests
Mar 31, 2026
d26ce5b
EC-1107 Fix Tests
Mar 31, 2026
8d5180a
EC-1107 Add Logging Info
Apr 1, 2026
817aa63
EC-1107 Add Express
Apr 2, 2026
5537ce6
EC-1107 Express
Apr 2, 2026
1927ff2
EC-1107 Express
Apr 2, 2026
5636fc1
EC-1107 Express
Apr 2, 2026
24a248c
EC-1107 SSR FIX
Apr 2, 2026
c933b71
EC-1107 Update Node Service
Apr 7, 2026
32705f0
EC-1107 Update Node Service
Apr 7, 2026
4b726a9
EC-1107 Decouple Node Hosting
Apr 7, 2026
566d70c
EC-1107 Disable Migrations
Apr 7, 2026
788d15e
EC-1107 Debug
Apr 7, 2026
c0e2a2e
EC-1107 Debug
Apr 7, 2026
d32da7a
EC-1107 Stop Redirect
Apr 8, 2026
810edae
EC-1107 Reinstate
Apr 8, 2026
2c9c51e
EC-1107 Disable HTTPS
Apr 8, 2026
ef02122
EC-1107 HTTPS Redirection
Apr 8, 2026
8b867a2
EC-1107
Apr 8, 2026
221ab53
EC-1107 Force HTTPS
Apr 8, 2026
7ebd203
EC-1107 PM2 Setup
Apr 8, 2026
0293be6
EC-1107 pm2
Apr 8, 2026
0cb7028
EC-1107 pm2
Apr 8, 2026
6a6d172
EC-1107 Readme
Apr 8, 2026
125fc1b
EC-1107 SSR Port
Apr 9, 2026
b70ebb7
EC-1107 Ssr Port
Apr 9, 2026
67f831b
EC-1107 ENV
Apr 9, 2026
e5d3517
EC-1107
Apr 9, 2026
62bd3b1
EC-1107
Apr 9, 2026
ad0508f
EC-1107
Apr 9, 2026
97a6a1e
EC-1107 SSR
Apr 9, 2026
6f45fa0
EC-1107 SSR
Apr 9, 2026
b8fdb26
EC-1107 Cleanup
Apr 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,4 @@ ClientApp/public/*.css.map
.vscode
/Comments/ClientApp/.vscode
Comments/ClientApp/todo.md
/Comments/ClientApp/src/index.js
14 changes: 4 additions & 10 deletions Comments.Test/Comments.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>

<IsPackable>false</IsPackable>
<PreserveCompilationContext>true</PreserveCompilationContext>
Expand All @@ -13,9 +13,9 @@
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
<PackageReference Include="FluentAssertions" Version="5.1.2" />

<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.15" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="10.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.5" />
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="2.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="Moq" Version="4.8.1" />
Expand All @@ -40,12 +40,6 @@
</None>
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.EntityFrameworkCore">
<HintPath>..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore\2.0.1\lib\netstandard2.0\Microsoft.EntityFrameworkCore.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup>
<None Update="diff-assertions.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
10 changes: 6 additions & 4 deletions Comments.Test/Infrastructure/FakeEncryption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ namespace Comments.Test.Infrastructure
public class FakeEncryption : IEncryption
{
public string EncryptString(string stringToEncrypt, byte[] key, byte[] iv)
{
throw new NotImplementedException();
{
return stringToEncrypt;

}

public string DecryptString(string stringToDecrypt, byte[] key, byte[] iv)
{
throw new NotImplementedException();
}
return stringToDecrypt;

}
}
}
9 changes: 8 additions & 1 deletion Comments.Test/Infrastructure/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ public TestBase(bool useRealSubmitService = false, TestUserType testUserType = T

var builder = new WebHostBuilder()
.UseContentRoot("../../../../Comments")
.ConfigureServices(services =>
.ConfigureAppConfiguration((context, config) =>
{
config.AddInMemoryCollection(new Dictionary<string, string>
{
["Encryption:Key"] = "Key",
["Encryption:IV"] = "IV"
});
}).ConfigureServices(services =>
{
services.AddEntityFrameworkSqlite();

Expand Down
10 changes: 10 additions & 0 deletions Comments.Test/Infrastructure/TestBaseLight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Collections.Generic;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Configuration;
using NICE.Identity.Authentication.Sdk.TokenStore;

namespace Comments.Test.Infrastructure
Expand All @@ -29,6 +31,14 @@ protected static (TestServer testServer, HttpClient httpClient) InitialiseServer

var builder = new WebHostBuilder()
.UseContentRoot("../../../../Comments")
.ConfigureAppConfiguration((context, config) =>
{
config.AddInMemoryCollection(new Dictionary<string, string>
{
["Encryption:Key"] = "Key",
["Encryption:IV"] = "IV"
});
})
.ConfigureServices(services =>
{
services.AddEntityFrameworkSqlite();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public async Task Create_Answer_As_Lead_Sets_Answer_Fields_Correctly()
response.EnsureSuccessStatusCode();

var responseString = await response.Content.ReadAsStringAsync();

var deserialisedAnswer = JsonConvert.DeserializeObject<ViewModels.Answer>(responseString);

var answerInDatabase = context.Answer.IgnoreQueryFilters().Single(dbAnswer => dbAnswer.AnswerId.Equals(deserialisedAnswer.AnswerId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ public async Task Delete_Comment_with_valid_organisation_session_cookie_deletes_
//Arrange
var context = new ConsultationsContext(GetContextOptions(), FakeUserService.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: OrganisationUserId), new FakeEncryption());
context.Database.EnsureDeleted();
var (server, client) = InitialiseServerAndClient(context);

var sourceURI = $"consultations://./consultation/{ConsultationId}/document/1/chapter/introduction";

var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, null, "123412341234");
var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, "NotAuthorised", "123412341234");
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, SessionId, null, OrganisationUserId);

var locationId = TestBaseDBHelpers.AddLocation(context, sourceURI);
var questionId = TestBaseDBHelpers.AddQuestion(context, locationId);
var existingAnswerId = TestBaseDBHelpers.AddAnswer(context, questionId, statusId: StatusId, organisationUserId: OrganisationUserId);
var (server, client) = InitialiseServerAndClient(context);

var updatedAnswerText = Guid.NewGuid().ToString();
var updatedAnswer = new ViewModels.Answer(existingAnswerId, updatedAnswerText, false, DateTime.UtcNow, "Carl Spackler", questionId, StatusId);
Expand All @@ -64,16 +64,16 @@ public async Task Delete_Comment_with_invalid_organisation_session_cookie_return
//Arrange
var context = new ConsultationsContext(GetContextOptions(), FakeUserService.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: OrganisationUserId), new FakeEncryption());
context.Database.EnsureDeleted();
var (server, client) = InitialiseServerAndClient(context);

var sourceURI = $"consultations://./consultation/{ConsultationId}/document/1/chapter/introduction";

var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, null, "123412341234");
var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, "NotAuthorised", "123412341234");
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, SessionId, null, OrganisationUserId);

var locationId = TestBaseDBHelpers.AddLocation(context, sourceURI);
var questionId = TestBaseDBHelpers.AddQuestion(context, locationId);
var existingAnswerId = TestBaseDBHelpers.AddAnswer(context, questionId, statusId: StatusId, organisationUserId: OrganisationUserId);
var (server, client) = InitialiseServerAndClient(context);

var updatedAnswerText = Guid.NewGuid().ToString();
var updatedAnswer = new ViewModels.Answer(existingAnswerId, updatedAnswerText, false, DateTime.UtcNow, "Carl Spackler", questionId, StatusId);
Expand All @@ -98,16 +98,16 @@ public async Task Delete_Comment_with_invalid_consultation_id_in_organisation_se
//Arrange
var context = new ConsultationsContext(GetContextOptions(), FakeUserService.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: OrganisationUserId), new FakeEncryption());
context.Database.EnsureDeleted();
var (server, client) = InitialiseServerAndClient(context);

var sourceURI = $"consultations://./consultation/{ConsultationId}/document/1/chapter/introduction";

var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, null, "123412341234");
var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, "NotAuthorised", "123412341234");
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, SessionId, null, OrganisationUserId);

var locationId = TestBaseDBHelpers.AddLocation(context, sourceURI);
var questionId = TestBaseDBHelpers.AddQuestion(context, locationId);
var existingAnswerId = TestBaseDBHelpers.AddAnswer(context, questionId, statusId: StatusId, organisationUserId: OrganisationUserId);
var (server, client) = InitialiseServerAndClient(context);

var updatedAnswerText = Guid.NewGuid().ToString();
var updatedAnswer = new ViewModels.Answer(existingAnswerId, updatedAnswerText, false, DateTime.UtcNow, "Carl Spackler", questionId, StatusId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,17 @@ public EditAnswerUsingOrganisationSessionCookieTests()

context = new ConsultationsContext(GetContextOptions(), FakeUserService.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: organisationUserId), new FakeEncryption());
context.Database.EnsureDeleted();
(_server, _) = InitialiseServerAndClient(context);

var sourceURI = $"consultations://./consultation/{ConsultationId}/document/1/chapter/introduction";

var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, null, "123412341234");
var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, "UserName", "123412341234");
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, _sessionId, null, organisationUserId);

var locationId = TestBaseDBHelpers.AddLocation(context, sourceURI);
_questionId = TestBaseDBHelpers.AddQuestion(context, locationId);
_existingAnswerId = TestBaseDBHelpers.AddAnswer(context, _questionId, statusId: StatusId, organisationUserId: organisationUserId);
(_server, _) = InitialiseServerAndClient(context);

}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async Task Create_Comment_As_Lead_And_With_Organisation_Cookie() //tests
var sourceURI = $"consultations://./consultation/{ConsultationId}/document/1";
TestBaseDBHelpers.AddStatus(context, "Draft", 1);

var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(organisationId, ConsultationId, context, null, "123412341234");
var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(organisationId, ConsultationId, context, "TheJudge", "123412341234");
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, _sessionId, null, organisationUserId);

var (_server, _client) = InitialiseServerAndClient(context, fakeUserService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@ public DeleteCommentUsingOrganisationSessionCookieTests()
const int organisationUserId = 1;
var context = new ConsultationsContext(GetContextOptions(), FakeUserService.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: organisationUserId), new FakeEncryption());
context.Database.EnsureDeleted();
(_server, _) = InitialiseServerAndClient(context);

var sourceURI = $"consultations://./consultation/{ConsultationId}/document/1/chapter/introduction";

var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, null, "123412341234");
var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, ConsultationId, context, "UserName", "123412341234");
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, _sessionId, null, organisationUserId);

var locationId = TestBaseDBHelpers.AddLocation(context, sourceURI);
var commentId = TestBaseDBHelpers.AddComment(context, locationId, "comment text", createdByUserId: null, organisationUserId: organisationUserId);

(_server, _) = InitialiseServerAndClient(context);

_comment = new ViewModels.Comment(locationId, sourceURI, null, null, null, null, null, null, null, 0,
DateTime.Now, Guid.Empty.ToString(), "comment text", 1, show: true, sectionHeader: null, sectionNumber: null)
{ CommentId = commentId };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,16 @@ public EditCommentUsingOrganisationSessionCookieTests()
const int organisationUserId = 1;
var context = new ConsultationsContext(GetContextOptions(), FakeUserService.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: organisationUserId), new FakeEncryption());
context.Database.EnsureDeleted();
(_server, _client) = InitialiseServerAndClient(context);

var sourceURI = $"consultations://./consultation/{consultationId}/document/1/chapter/introduction";

var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, consultationId, context, null, "123412341234");
var organisationAuthorisationId = TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(1, consultationId, context, "UserName", "123412341234");
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, _sessionId, null);

var locationId = TestBaseDBHelpers.AddLocation(context, sourceURI);
var commentId = TestBaseDBHelpers.AddComment(context, locationId, "comment text", createdByUserId: null, organisationUserId: organisationUserId);

(_server, _client) = InitialiseServerAndClient(context);

comment = new ViewModels.Comment(1, sourceURI, null, null, null, null, null, null, null, 0,
DateTime.Now, Guid.Empty.ToString(), "comment text", 1, show: true, sectionHeader: null, sectionNumber: null)
{ CommentId = commentId };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void GetAllCommentsAndQuestionsForDocumentCanHandleOrganisationAuthorisat

var sourceURI = $"consultations://./consultation/{consultationId}";

TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(organisationId, consultationId, context, null, "123412341234");
TestBaseDBHelpers.AddOrganisationAuthorisationWithLocation(organisationId, consultationId, context, userId: "Carl", "123412341234");

//Act
var locations = context.GetAllCommentsAndQuestionsForDocument(new List<string>() {sourceURI}, true);
Expand Down
13 changes: 7 additions & 6 deletions Comments.Test/IntegrationTests/API/Submit/SubmitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ public async Task Submit_Comments_To_Organisation_Lead()
var context = new ConsultationsContext(GetContextOptions(),
FakeUserService.Get(isAuthenticated: false, displayName: "Carl Spackler", userId: "Carl", testUserType: TestUserType.NotAuthenticated, organisationIdUserIsLeadOf: organisationId, organisationUserId: organisationUserId), fakeEncryption);
context.Database.EnsureDeleted();
var fakeHttpContextAccessor = FakeHttpContextAccessor.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: organisationUserId);
var fakeConsultationService = new FakeConsultationService();
var userService = FakeUserService.Get(true, "Benjamin Button", null, TestUserType.NotAuthenticated, false, organisationUserId);
var commentService = new CommentService(context, userService, fakeConsultationService, fakeHttpContextAccessor);

var (_server, _client) = InitialiseServerAndClient(context, userService, fakeConsultationService);

var sourceURI = "consultations://./consultation/1/document/1/chapter/introduction";
var consultationId = 1;
Expand All @@ -86,11 +92,7 @@ public async Task Submit_Comments_To_Organisation_Lead()
TestBaseDBHelpers.AddOrganisationUser(context, organisationAuthorisationId, authorisationSession, null, organisationUserId: organisationUserId);
TestBaseDBHelpers.AddStatus(context, nameof(StatusName.SubmittedToLead), (int)StatusName.SubmittedToLead);

var userService = FakeUserService.Get(true, "Benjamin Button", null, TestUserType.NotAuthenticated, false, organisationUserId);

var fakeHttpContextAccessor = FakeHttpContextAccessor.Get(isAuthenticated: false, testUserType: TestUserType.NotAuthenticated, organisationUserId: organisationUserId);
var fakeConsultationService = new FakeConsultationService();
var commentService = new CommentService(context, userService, fakeConsultationService, fakeHttpContextAccessor);


var locationId = TestBaseDBHelpers.AddLocation(context, sourceURI);
var questionId = TestBaseDBHelpers.AddQuestion(context, locationId);
Expand All @@ -102,7 +104,6 @@ public async Task Submit_Comments_To_Organisation_Lead()
var submissionToLead = new SubmissionToLead(commentsAndQuestions.Comments, commentsAndQuestions.Questions.First().Answers, emailAddress, true, "Organisation");
var content = new StringContent(JsonConvert.SerializeObject(submissionToLead), Encoding.UTF8, "application/json");

var (_server, _client) = InitialiseServerAndClient(context, userService, fakeConsultationService);

//Act
var response = await _client.PostAsync($"consultations/api/SubmitToLead", content);
Expand Down
4 changes: 2 additions & 2 deletions Comments.Test/UnitTests/OrganisationService.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void OrganisationAlreadyHasACollationCodeForThisConsultation()
public void CollationCodeIsCorrectFormat()
{
//Arrange
var fakeUserService = FakeUserService.Get(isAuthenticated: true, displayName: "The Judge", testUserType: TestUserType.Authenticated, organisationUserId: null, organisationIdUserIsLeadOf: 1);
var fakeUserService = FakeUserService.Get(isAuthenticated: true, displayName: "The Judge", userId: "TheJudge", testUserType: TestUserType.Authenticated, organisationUserId: null, organisationIdUserIsLeadOf: 1);
var serviceUnderTest = new OrganisationService(_context, fakeUserService, null, null, null, null);
var regex = new Regex(Constants.CollationCode.RegExChunkedWithSpaces);

Expand All @@ -84,7 +84,7 @@ public void CollationCodeIsCorrectFormat()
public void CollationCodeIsReturnedDifferentInRepeatedCalls()
{
//Arrange
var fakeUserService = FakeUserService.Get(isAuthenticated: true, displayName: "The Judge", testUserType: TestUserType.Authenticated, organisationUserId: null, organisationIdUserIsLeadOf: 1);
var fakeUserService = FakeUserService.Get(isAuthenticated: true, displayName: "The Judge", userId: "TheJudge", testUserType: TestUserType.Authenticated, organisationUserId: null, organisationIdUserIsLeadOf: 1);
var serviceUnderTest = new OrganisationService(_context, fakeUserService, null, null, null, null);
const int numberOfTimesToGetCollationCode = 100;

Expand Down
2 changes: 2 additions & 0 deletions Comments/ClientApp/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
API_URL=https://niceorg:44306
PORT=5000
PUBLIC_URL=/consultations
REACT_APP_HOTJARID=1018214
REACT_APP_ACCOUNTS_ENVIRONMENT=beta
Expand Down
3 changes: 3 additions & 0 deletions Comments/ClientApp/.env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
PORT=#{AppSettings:Environment:SsrPort}
PUBLIC_URL=/consultations
REACT_APP_HOTJARID=1018682
REACT_APP_ACCOUNTS_ENVIRONMENT=#{AppSettings:Environment:AccountsEnvironment}
REACT_APP_GLOBAL_NAV_SCRIPT=#{GlobalNav:Script}
REACT_APP_GLOBAL_NAV_SCRIPT_IE8=#{GlobalNav:ScriptIE8}
REACT_APP_COOKIE_BANNER_SCRIPT=#{GlobalNav:CookieBannerScript}

12 changes: 12 additions & 0 deletions Comments/ClientApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can find the most recent version of this guide [here](https://github.com/fac

## Table of Contents

- [.NET 10 Upgrade Update](#net-10-upgrade-update)
- [Updating to New Releases](#updating-to-new-releases)
- [Sending Feedback](#sending-feedback)
- [Folder Structure](#folder-structure)
Expand Down Expand Up @@ -95,6 +96,17 @@ You can find the most recent version of this guide [here](https://github.com/fac
- [Moment.js locales are missing](#momentjs-locales-are-missing)
- [Something Missing?](#something-missing)

## Net 10 Upgrade Update
Server side rendering was previously entirely handled by .NET but this was removed in later versions of .NET. With .NET 10 framework we call the react app via http://localhost:port and post the JSON properties such as `isAuthorised`, `displayName`, `isAdminUser` etc we then render this server side.

PM2 is deployed on staging environments, locally you can use `npm run start:ssr`

`"start:ssr": "dotenv -e .env node src/server/ssr-server.js"`

Once the noder server is running you can open the site in Visual Studio, just make sure the value for ` "AppSettings:Environment:SsrPort"`in your secrets matches with the port number in .env.

.env and .env.production are used to control which port to assign.

## Updating to New Releases

Create React App is divided into two packages:
Expand Down
Loading