Startoption -dev: lokale Test-Website (localhost:5080)

Eigene Anmeldung (settings.dev.json), bleibt bei Selbst-Installation und Update erhalten, DEV-Schild in der Oberflaeche.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 17:48:47 +01:00
co-authored by Claude Opus 5.5
parent b69b9638ff
commit 077e39fa8a
10 changed files with 46 additions and 9 deletions
+9 -2
View File
@@ -8,8 +8,15 @@ namespace BSO.Launcher;
public static class Api
{
public const string BaseUrl = "https://bso.mbm.wtf";
/// <summary>Zum Testen umstellbar: BSO_LAUNCHER_API=http://localhost:5080</summary>
public static string Base => (Environment.GetEnvironmentVariable("BSO_LAUNCHER_API") ?? BaseUrl).TrimEnd('/');
/// <summary>Lokale Test-Website (BSO-Website mit "dotnet run --urls http://localhost:5080").</summary>
public const string DevUrl = "http://localhost:5080";
public const string DevArg = "-dev";
/// <summary>Mit -dev (oder --dev) gestartet: gegen die lokale Test-Website statt bso.mbm.wtf.</summary>
public static readonly bool Dev = Environment.GetCommandLineArgs().Skip(1).Any(a => a is "-dev" or "--dev");
/// <summary>Adresse der Website. BSO_LAUNCHER_API geht vor (beliebiger Test-Server), dann -dev, sonst bso.mbm.wtf.</summary>
public static string Base => (Environment.GetEnvironmentVariable("BSO_LAUNCHER_API") ?? (Dev ? DevUrl : BaseUrl)).TrimEnd('/');
public static readonly HttpClient Http = CreateHttp();