Add npm app to Aspire resources

This commit is contained in:
2025-06-13 20:12:43 +02:00
parent 20ba638b64
commit f00e3cdb6a
2 changed files with 8 additions and 1 deletions

View File

@@ -7,9 +7,15 @@ IResourceBuilder<PostgresDatabaseResource> postgres = builder.AddPostgres(Consta
.WithDataVolume()
.AddDatabase(Constants.Database.Name);
builder
IResourceBuilder<ProjectResource> api = builder
.AddProject<Projects.Vegasco_Server_Api>(Constants.Projects.Api)
.WithReference(postgres)
.WaitFor(postgres);
builder
.AddNpmApp("Vegasco-Web", "../Vegasco-Web")
.WithReference(api)
.WaitFor(api)
.WithHttpEndpoint(targetPort: 4200);
builder.Build().Run();