This README.md is just a quick reference, but if you are onboarding, take a look at the onboarding documentation to set up the project properly.
- .NET 6.0
- Docker
- Used for running test containers while testing
- Also used for running MongoDB locally for dev environment.
- Node.js LTS
- Used for running the TailwindCSS compiler.
After opening the project, install all needed dependencies (IDE should do it by itself*).
*If not, run the following command:
dotnet restore
- As Blazor 6 is outdated and we don't expect patching comming from the DotNet team, we've had to patch the Blazor Authentication library to support Cognito, you can see that in
index.html
we've switched the defaultAuthentication.js
file for the patched one, present in our js folder. To see the patches, look for//PATCH: ...
in the code. Brief summary of the patches- Disable silent login using Iframe, as Cognito doesn't support it and Blazor will wait for 10 SECONDS before trying the redirect login
- Tweak the logout params as Blazor was not using the previous fix on
Authentication.razor
file and using the default parameters instead, being those not supported by Cognito.
Execute the project
cd SherpaBackend && dotnet run
or in watch mode
cd SherpaBackend && dotnet watch
You can use the following command:
docker run --name mongo -p 27017:27017 -d mongodb/mongodb-community-server:latest
For this DB, the connection string would be: mongodb://localhost:27017/
Run the following command:
dotnet test
While executing the SherpaBackend tests some docker containers will open and close. This is normal, check (https://dotnet.testcontainers.org/) for more info.