elsa-core/src/dashboards/blazor/ElsaDashboard.Application.WebAssembly/Program.cs

25 lines
804 B
C#
Raw Normal View History

2020-10-26 20:46:43 +00:00
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Net.Http;
using System.Threading.Tasks;
using ElsaDashboard.WebAssembly.Extensions;
2020-10-26 20:46:43 +00:00
namespace ElsaDashboard.Application.WebAssembly
2020-10-26 20:46:43 +00:00
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
var services = builder.Services;
2020-12-11 19:42:04 +00:00
//builder.RootComponents.Add<App>("#app");
services.AddScoped(sp => new HttpClient {BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)});
services.AddElsaDashboardUI();
services.AddElsaDashboardBackend();
2020-10-26 20:46:43 +00:00
await builder.Build().RunAsync();
}
}
}