revert: 示例回到 image/compile-dotnet6/demo,移除顶层 demo 目录

This commit is contained in:
2025-11-08 21:55:08 +08:00
parent 5c929a6ed6
commit 1976816e4e
12 changed files with 6 additions and 36 deletions
-18
View File
@@ -1,18 +0,0 @@
var builder = WebApplication.CreateBuilder(args);
// 容器内监听 8080,避免与宿主机其它 80 端口冲突;可用环境变量 ASPNETCORE_URLS 覆盖
builder.WebHost.UseUrls(Environment.GetEnvironmentVariable("ASPNETCORE_URLS") ?? "http://0.0.0.0:8080");
var app = builder.Build();
app.MapGet("/", () => Results.Json(new
{
message = "dotnet6 is running",
runtime = Environment.Version.ToString(),
os = System.Runtime.InteropServices.RuntimeInformation.OSDescription,
time = DateTimeOffset.Now.ToString("yyyy-MM-dd HH:mm:ss zzz")
}));
app.MapGet("/health", () => Results.Ok("ok"));
app.Run();