Skip to content

Commit e9d2c82

Browse files
authored
Updates
1 parent c1046b2 commit e9d2c82

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

aspnetcore/fundamentals/servers/yarp/getting-started.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ai-usage: ai-assisted
1212

1313
# Getting Started with YARP
1414

15-
YARP is designed as a library that provides the core proxy functionality which you can then customize by adding or replacing modules. YARP is currently provided as a NuGet package and code snippets. We plan on providing a project template and pre-built executable (`.exe`) in the future.
15+
YARP is designed as a library that provides the core proxy functionality which you can then customize by adding or replacing modules. YARP is currently provided as a NuGet package and code snippets. We plan on providing a project template and prebuilt executable (`.exe`) in the future.
1616

1717
YARP is implemented on top of .NET Core infrastructure and is usable on Windows, Linux or MacOS. Development can be done with the SDK and your favorite editor, [Microsoft Visual Studio](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/).
1818

@@ -22,7 +22,7 @@ You can download the .NET SDK from https://dotnet.microsoft.com/download/dotnet/
2222

2323
Visual Studio support for .NET 8 is included in Visual Studio 2022 17.8.
2424

25-
### Create a new project
25+
## Create a new project
2626

2727
A complete version of the project built using the steps below can be found at [Basic YARP Sample](https://github.com/microsoft/reverse-proxy/tree/release/latest/samples/BasicYarpSample).
2828

@@ -34,17 +34,19 @@ dotnet new web -n MyProxy -f net8.0
3434

3535
Alternatively, create a new ASP.NET Core web application in Visual Studio 2022, choosing "Empty" for the project template.
3636

37-
### Add the project reference
37+
## Add the package reference
3838

39-
```XML
40-
<ItemGroup>
41-
<PackageReference Include="Yarp.ReverseProxy" Version="2.3.0" />
42-
</ItemGroup>
39+
Add a package reference for [`Yarp.ReverseProxy`](https://www.nuget.org/packages/Yarp.ReverseProxy), version 2.3.0 or later.
40+
41+
```dotnetcli
42+
dotnet add package Yarp.ReverseProxy
4343
```
4444

45-
### Add the YARP Middleware
45+
[!INCLUDE[](~/includes/package-reference.md)]
4646

47-
Update Program.cs to use the YARP middleware:
47+
## Add the YARP Middleware
48+
49+
Update the `Program` file to use the YARP Middleware:
4850

4951
```csharp
5052
var builder = WebApplication.CreateBuilder(args);
@@ -63,7 +65,7 @@ The configuration can also be provided programmatically. For more information, s
6365

6466
Learn more about the available configuration options by looking at <xref:Yarp.ReverseProxy.Configuration.RouteConfig> and <xref:Yarp.ReverseProxy.Configuration.ClusterConfig>.
6567

66-
```JSON
68+
```json
6769
{
6870
"Logging": {
6971
"LogLevel": {
@@ -95,6 +97,8 @@ Learn more about the available configuration options by looking at <xref:Yarp.Re
9597
}
9698
```
9799

98-
### Running the project
100+
## Run the project
101+
102+
When using the .NET CLU, use `dotnet run` called within the sample's directory or `dotnet run --project <path to .csproj file>`.
99103

100-
Use `dotnet run` called within the sample's directory or `dotnet run --project <path to .csproj file>`
104+
In Visual Studio, start the app with the **Run** button.

0 commit comments

Comments
 (0)