diff --git a/.github/workflows/azure-static-web-apps-icy-stone-037d9d81e.yml b/.github/workflows/azure-static-web-apps-icy-stone-037d9d81e.yml index 0c93acf..be697b2 100644 --- a/.github/workflows/azure-static-web-apps-icy-stone-037d9d81e.yml +++ b/.github/workflows/azure-static-web-apps-icy-stone-037d9d81e.yml @@ -18,12 +18,12 @@ jobs: - uses: actions/checkout@v2 with: submodules: true -γ€€ - name: Set up .NET Core + - name: Set up .NET Core uses: actions/setup-dotnet@v1 - γ€€with: + with: dotnet-version: '3.1.x' - γ€€- name: Build Blazor Application - γ€€run: dotnet publish -c Release -p:DefineConstants=AZURE_STATIC_WEB_APP ./BlazorMultiComputerVisionWebasm/Client/BlazorMultiComputerVisionWebasm.Client.csproj + - name: Build Blazor Application + run: dotnet publish -c Release -p:DefineConstants=AZURE_STATIC_WEB_APP ./BlazorMultiComputerVisionWebasm/Client/BlazorMultiComputerVisionWebasm.Client.csproj - name: Deploy id: deploy uses: Azure/static-web-apps-deploy@v0.0.1-preview diff --git a/BlazorMultiComputerVisionWebasm/Client/Program.cs b/BlazorMultiComputerVisionWebasm/Client/Program.cs index 16da20f..64dbe9e 100644 --- a/BlazorMultiComputerVisionWebasm/Client/Program.cs +++ b/BlazorMultiComputerVisionWebasm/Client/Program.cs @@ -24,7 +24,12 @@ public static async Task Main(string[] args) // XXX ‚±‚κ‚Ύ‚Ζ”FΨ‚³‚κ‚½ƒ†[ƒU[‚ΜƒŠƒNƒGƒXƒg‚©‚η‚ΰƒpƒ‰ƒ[ƒ^‚ͺ–³‚­‚Θ‚Α‚Ώ‚α‚€‚ρ‚Ύ‚ζ‚ˁB’‚ι‚ˁB builder.Services.AddSingleton(new AllowGuestHttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); - builder.Services.AddHttpClient("BlazorMultiComputerVisionWebasm.ServerAPI", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)) +#if AZURE_STATIC_WEB_APP + var apiBase = new Uri("https://blazormulticomputervisionwebasmserver.azurewebsites.net/"); +#else + var apiBase = new Uri(builder.HostEnvironment.BaseAddress); +#endif + builder.Services.AddHttpClient("BlazorMultiComputerVisionWebasm.ServerAPI", client => client.BaseAddress = apiBase) .AddHttpMessageHandler(); // Supply HttpClient instances that include access tokens when making requests to the server project diff --git a/BlazorMultiComputerVisionWebasm/Client/wwwroot/index.html b/BlazorMultiComputerVisionWebasm/Client/wwwroot/index.html new file mode 100644 index 0000000..f719a77 --- /dev/null +++ b/BlazorMultiComputerVisionWebasm/Client/wwwroot/index.html @@ -0,0 +1,30 @@ +ο»Ώ + + + + + + MultiComputerVision - BlazorWebasm + + + + + + + + + + Loading... + +
+ An unhandled error has occurred. + Reload + πŸ—™ +
+ + + + + + + diff --git a/BlazorMultiComputerVisionWebasm/Client/wwwroot/routes.json b/BlazorMultiComputerVisionWebasm/Client/wwwroot/routes.json new file mode 100644 index 0000000..e3e33a0 --- /dev/null +++ b/BlazorMultiComputerVisionWebasm/Client/wwwroot/routes.json @@ -0,0 +1,8 @@ +ο»Ώ{ + "routes": [ + { + "route": "/*", + "serve": "/index.html" + } + ] +} \ No newline at end of file