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;
|
2020-11-14 14:44:03 +00:00
|
|
|
using ElsaDashboard.WebAssembly.Extensions;
|
2020-10-26 20:46:43 +00:00
|
|
|
|
2020-11-14 14:44:03 +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);
|
2020-11-13 21:37:53 +00:00
|
|
|
var services = builder.Services;
|
|
|
|
|
|
2020-12-11 19:42:04 +00:00
|
|
|
//builder.RootComponents.Add<App>("#app");
|
2020-11-13 21:37:53 +00:00
|
|
|
services.AddScoped(sp => new HttpClient {BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)});
|
2020-11-14 14:44:03 +00:00
|
|
|
services.AddElsaDashboardUI();
|
|
|
|
|
services.AddElsaDashboardBackend();
|
2020-10-26 20:46:43 +00:00
|
|
|
|
|
|
|
|
await builder.Build().RunAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-11-13 21:37:53 +00:00
|
|
|
}
|