From eb32a2526a07e57e9cdcb548ec516a7f9cb266bc Mon Sep 17 00:00:00 2001 From: Meleki Date: Tue, 10 Mar 2026 07:40:26 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Windows-Dienst-Unterst=C3=BCtzung=20via?= =?UTF-8?q?=20AddWindowsService?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Program.cs | 5 +++++ gott.csproj | 1 + 2 files changed, 6 insertions(+) diff --git a/Program.cs b/Program.cs index a84dd5b..ab91d95 100644 --- a/Program.cs +++ b/Program.cs @@ -1,15 +1,20 @@ using System; using System.IO; using System.Net.Http; +using System.Runtime.InteropServices; using Gott.Endpoints; using Gott.Middleware; using Gott.Services; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; var builder = WebApplication.CreateBuilder(args); +if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + builder.Services.AddWindowsService(); + builder.Services.AddHttpClient(); var dataDir = Path.Combine(AppContext.BaseDirectory, "data"); diff --git a/gott.csproj b/gott.csproj index 89166b1..3d79b58 100755 --- a/gott.csproj +++ b/gott.csproj @@ -33,6 +33,7 @@ +