From f00e3cdb6ab41c9069b02e8079a0850099ce1cdc Mon Sep 17 00:00:00 2001 From: ThompsonNye Date: Fri, 13 Jun 2025 20:12:43 +0200 Subject: [PATCH] Add npm app to Aspire resources --- src/Vegasco.Server.AppHost/Program.cs | 8 +++++++- src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Vegasco.Server.AppHost/Program.cs b/src/Vegasco.Server.AppHost/Program.cs index 5d592bc..b56fd3e 100644 --- a/src/Vegasco.Server.AppHost/Program.cs +++ b/src/Vegasco.Server.AppHost/Program.cs @@ -7,9 +7,15 @@ IResourceBuilder postgres = builder.AddPostgres(Consta .WithDataVolume() .AddDatabase(Constants.Database.Name); -builder +IResourceBuilder api = builder .AddProject(Constants.Projects.Api) .WithReference(postgres) .WaitFor(postgres); +builder + .AddNpmApp("Vegasco-Web", "../Vegasco-Web") + .WithReference(api) + .WaitFor(api) + .WithHttpEndpoint(targetPort: 4200); + builder.Build().Run(); diff --git a/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj b/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj index e4de3b0..dc8b747 100644 --- a/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj +++ b/src/Vegasco.Server.AppHost/Vegasco.Server.AppHost.csproj @@ -13,6 +13,7 @@ + 3.7.115