summary refs log tree commit diff
path: root/testFrontend/SafeNSound.FakeUser/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'testFrontend/SafeNSound.FakeUser/Program.cs')
-rw-r--r--testFrontend/SafeNSound.FakeUser/Program.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/testFrontend/SafeNSound.FakeUser/Program.cs b/testFrontend/SafeNSound.FakeUser/Program.cs

index 3751555..7c3eaff 100644 --- a/testFrontend/SafeNSound.FakeUser/Program.cs +++ b/testFrontend/SafeNSound.FakeUser/Program.cs
@@ -1,2 +1,24 @@ // See https://aka.ms/new-console-template for more information + +using SafeNSound.FakeUser; +using SafeNSound.Sdk; + Console.WriteLine("Hello, World!"); + +var builder = Host.CreateApplicationBuilder(args); +// longer shutdown timeout +builder.Services.Configure<HostOptions>(options => { + options.ShutdownTimeout = TimeSpan.FromSeconds(120); +}); + +builder.Services.AddSingleton<SafeNSoundConfiguration>(); +builder.Services.AddSingleton<SafeNSoundAuthentication>(); +builder.Services.AddSingleton<UserStore>(); +builder.Services.AddHostedService<UserStore>(sp => sp.GetRequiredService<UserStore>()); +builder.Services.AddHostedService<RandomAlarmService>(); +builder.Services.AddHostedService<MonitorService>(); + +// WrappedHttpClient.LogRequests = false; + +var host = builder.Build(); +host.Run(); \ No newline at end of file