Add binary release package for yarp github release, and add necessary powershell script to the package. #1404
-
CurrentI said that yarp did not work out of the box. It's like, you buy a car, but you have to crank it with a lever. This is very unprofessional. This greatly limits the widespread use of yarp. According to the tutorial, you must:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddReverseProxy()
.LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));
var app = builder.Build();
app.MapReverseProxy();
app.Run(); Subject: Add binary release package for yarp github release, and add necessary powershell script to the package.Subtitle 1: powershell is the best solution for win and linux deployment of yarp.
Subtitle 2: The ps1 script should not be included in the nuget package, but a powershell script should be added to the binary release package.
Subtitle 3: Control yarp
Is yarp facing the last mile problem? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
The library approach is intentional, it's expected that many consumers of YARP want to customize it with code. While we may provide pre-built images in the future, there's currently little reason to use that compared to other reverse proxies. Can you create an example of what it would be like to use YARP from Powershell? That's not a common approach we've seen with ASP.NET Core based libraries. |
Beta Was this translation helpful? Give feedback.
-
My environment is win+powershell7.2 (.net6), Set-Location $PSScriptRoot # into current directory
Add-Type -Path "${PSScriptRoot}/net6.0/Yarp.ReverseProxy.dll" # download from nuget
Add-Type -Path "${PSScriptRoot}/ReverseProxy.cs"
#or
Add-Type @'
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddReverseProxy()
.LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));
var app = builder.Build();
app.MapReverseProxy();
app.Run();
'@ |
Beta Was this translation helpful? Give feedback.
Related: #167, #261
The library approach is intentional, it's expected that many consumers of YARP want to customize it with code. While we may provide pre-built images in the future, there's currently little reason to use that compared to other reverse proxies.
Can you create an example of what it would be like to use YARP from Powershell? That's not a common approach we've seen with ASP.NET Core based libraries.