Started with servers sync to daemon

This commit is contained in:
2024-12-24 00:42:17 +01:00
parent 4326af2925
commit 9f8c1f6d24
19 changed files with 271 additions and 12 deletions

View File

@@ -6,6 +6,7 @@ using MoonCore.Extensions;
using MoonCore.Helpers;
using MoonCore.Services;
using MoonlightServers.Daemon.Configuration;
using MoonlightServers.Daemon.Services;
namespace MoonlightServers.Daemon;
@@ -41,6 +42,7 @@ public class Startup
await RegisterLogging();
await RegisterBase();
await RegisterDocker();
await RegisterServers();
await BuildWebApplication();
@@ -238,4 +240,22 @@ public class Startup
}
#endregion
#region Servers
private Task RegisterServers()
{
WebApplicationBuilder.Services.AddHostedService<ApplicationStateService>(
sp => sp.GetRequiredService<ApplicationStateService>()
);
return Task.CompletedTask;
}
private Task UseServers()
{
return Task.CompletedTask;
}
#endregion
}