using IntegryApiClient.Blazor; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using MudBlazor.Services; using Template.Shared.Components; using Template.Shared.Interfaces; using Template.Web.Services; #if DEBUG const string BaseRestServicesEndpoint = "https://devservices.studioml.it/ems-api/"; //const string BaseRestServicesEndpoint = "http://192.168.2.23:8080/ems-api/"; #else const string BaseRestServicesEndpoint = "https://services.studioml.it/ems-api/"; #endif var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.Services.AddMudServices(); builder.Services.AddAuthorizationCore(); builder.Services.UseIntegry(BaseRestServicesEndpoint); builder.Services.AddScoped(); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); await builder.Build().RunAsync();