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 76b5867 commit 2ee65da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using System.Runtime.InteropServices;

var builder = WebApplication.CreateSlimBuilder(args);
builder.Configuration.AddJsonFile("appsettings.json", true, true);
Expand All @@ -10,7 +11,8 @@
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 = System.Environment.OSVersion.Platform;
var platform = RuntimeInformation.OSArchitecture;
var platformValue = platform == Architecture.Arm64 ? "arm64" : "amd64" ;

app.MapGet("/", () => $"{message} on {platform}.");
app.MapGet("/", () => $"{message} on {platformValue}.");
app.Run();

0 comments on commit 2ee65da

Please sign in to comment.