Blazor Sample Application

What this sample has:

  • Blazor is a framework for building interactive client-side web UI with .NET
  • Radzen Blazor Components is a free set of 50+ native Blazor UI controls.
  • bUnit is a testing library for Blazor Components
  • Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.
  • AWS copilot is a tool for developers to create, release and manage production ready containerized applications on Amazon ECS and AWS Fargate.

Architecture

architecture diagram

CI/CD

ci/cd diagram

Local development

Prerequisites

git clone https://github.com/efimenkop/BlazorDemo

Running locally

Open BlazorDemo.sln in Visual Studio and hit F5

OR

dotnet run --project BlazorDemo\BlazorDemo.csproj

Running tests

In Visual Studio Test -> Run All Tests

OR

dotnet test

Deploying to AWS Fargate with copilot

The AWS Copilot CLI is a tool for developers to create, release and manage production ready containerized applications on Amazon ECS and AWS Fargate. From getting started, pushing to a test environment and releasing to production, Copilot helps you through the entire life of your app development.

Prerequisites

* if you're on Windows: download copilot-windows-v0.3.0.exe and move it to solution folder

  • Deploy application

Windows

.\copilot-windows-v0.3.0.exe init --app blazorapp ^
--svc blazor-demo ^
--svc-type "Load Balanced Web Service" ^
--dockerfile "Dockerfile" ^
--deploy

Linux

copilot init --app blazorapp \
--svc blazor-demo \
--svc-type 'Load Balanced Web Service' \
--dockerfile 'Dockerfile' \
--deploy