blob: 243f3cda06f613c3236a4c4bbbcf990fb03abf8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
using HyperBooru.ApiClient;
using HyperBooru.Client.Services;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
namespace HyperBooru.Client;
internal class Program {
static async Task Main(string[] args) {
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.Services.AddSingleton<ISourceService, SourceService>();
builder.Services.AddSingleton<HBSession>(sp => new(new HttpClient {
BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)
}));
await builder.Build().RunAsync();
}
}
|