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:
+9
-2
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user