is there a way to specify a static dev URL for AddNpmApp? #1738
-
I am using the following for my node frontend:
the current issue I am trying to solve is related to my authentication provider (Auth0) they require a static callback address for login/logout ect... issue being that when AddNpmApp creates the port lifecycle it is seemingly random each time. and so I cannot specify the correct development callback address is there a way to make this localhost address the same each time? or any reason why this is not the default functionality? Thank you in advance for your responses <3 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Specify a host port and pass that to the application. builder.AddNpmApp("frontend", "../../app-frontend", builder.Environment.IsDevelopment() ? "dev" : "start")
.WithReference(realtimerules_api)
.WithServiceBinding(hostPort: 8085, containerPort: 3000, scheme: "http", env: "PORT"); Then you can hardcode 8085 in your auth configuration.
You can read about how networking works here https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/networking-overview |
Beta Was this translation helpful? Give feedback.
Specify a host port and pass that to the application.
Then you can hardcode 8085 in your auth configuration.
You can read about how networking works here https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/networking-overview