Add admin Vite app to Aspire AppHost

Registers the Vue admin as an Aspire resource via AddViteApp, wired to
the API so Aspire injects service discovery env vars that the existing
Vite proxy config already reads.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Wampler
2026-06-10 21:46:52 -07:00
co-authored by Claude Sonnet 4.6
parent e3b8cd9067
commit e51e28d411
3 changed files with 15 additions and 1 deletions
+6 -1
View File
@@ -4,6 +4,11 @@ var postgres = builder.AddPostgres("postgres").WithDataVolume("miccheck-pgdata")
var miccheckDb = postgres.AddDatabase("miccheck"); var miccheckDb = postgres.AddDatabase("miccheck");
builder.AddProject<Projects.MicCheck_Api>("api").WithReference(miccheckDb).WaitFor(miccheckDb); var api = builder.AddProject<Projects.MicCheck_Api>("api").WithReference(miccheckDb).WaitFor(miccheckDb);
builder.AddViteApp("admin", "../admin", "serve")
.WithReference(api)
.WaitFor(api)
.WithExternalHttpEndpoints();
builder.Build().Run(); builder.Build().Run();
@@ -2,6 +2,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\api\MicCheck.Api\MicCheck.Api.csproj" /> <ProjectReference Include="..\api\MicCheck.Api\MicCheck.Api.csproj" />
<ProjectReference Include="..\admin\Admin.esproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -4,5 +4,13 @@
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning"
} }
},
"Dashboard": {
"Frontend": {
"AuthMode": "Unsecured"
},
"Otlp": {
"AuthMode": "Unsecured"
}
} }
} }