Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-benoit authored Dec 30, 2024
1 parent 0b6ec64 commit 5823c75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
var message = builder.Configuration["MESSAGE"] ?? "Hello, World! (from code)";
var podName = builder.Configuration["POD_NAME"];
var namespaceName = builder.Configuration["NAMESPACE_NAME"];
message = string.IsNullOrEmpty(podName) || string.IsNullOrEmpty(namespaceName) ? message : $"{message} - from {podName} / {namespaceName}";
var platform = Environment.OSVersion.Platform;

app.MapGet("/", () => string.IsNullOrEmpty(podName) || string.IsNullOrEmpty(namespaceName) ? message : $"{message} - from {podName} / {namespaceName}.");
app.MapGet("/", () => $"{message} on {platform}.");
app.Run();

0 comments on commit 5823c75

Please sign in to comment.