Skip to content

Commit

Permalink
Add references and WithExternalHttpEndpoints This builds a dependency…
Browse files Browse the repository at this point in the history
… map.

see dotnet/aspire#836
  • Loading branch information
StevenTCramer committed May 22, 2024
1 parent 700eeb6 commit 5056d81
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
var builder = DistributedApplication.CreateBuilder(args);
IDistributedApplicationBuilder builder = DistributedApplication.CreateBuilder(args);

builder.AddProject<Projects.Api_Server>("api-server");
IResourceBuilder<ProjectResource> apiServer =builder.AddProject<Projects.Api_Server>("api-server");
IResourceBuilder<ProjectResource> grpcServer = builder.AddProject<Projects.Grpc_Server>("grpc-server");

builder.AddProject<Projects.Yarp>("yarp");
IResourceBuilder<ProjectResource> webServer =
builder
.AddProject<Projects.Web_Server>("web-server")
.WithExternalHttpEndpoints()
.WithReference(apiServer)
.WithReference(grpcServer);

builder.AddProject<Projects.Web_Server>("web-server");

builder.AddProject<Projects.Grpc_Server>("grpc-server");
builder.AddProject<Projects.Yarp>("yarp")
.WithReference(apiServer)
.WithReference(webServer)
.WithReference(grpcServer);

builder.Build().Run();

0 comments on commit 5056d81

Please sign in to comment.