# yarn-samlpes **Repository Path**: DotNetExample/yarn-samlpes ## Basic Information - **Project Name**: yarn-samlpes - **Description**: # yarn 使用示例: - 使用 yarn 作为网关 - ​ 如何通过 YarpGateway 访问这两个服务的Swagger呢 项目结构如下: 网关项目:YarpGateway 微服务:IdentityServer 微服务:OrderServer 启动网关 ... 更多信息:参见文档文件夹docs - **Primary Language**: C# - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2022-07-21 - **Last Updated**: 2022-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 示例 示例包含如下内容: - 演示如何使用 yarn 做网关 - 演示如何通过 YarpGateway 访问内部服务的 Swagger # 项目结构 1. 网关项目:YarpGateway 2. IdentityService 服务 3. OrderService 服务 # 运行 ## 启动网关 在项目的`bin/net6.0`目录下打开 CMD,执行如下命令启动网关: ```powershell dotnet YarpGateway.dll --urls "http://localhost:7700" ``` 监听端口:7700 ## dentityService 在项目的`bin/net6.0`目录下打开 CMD,执行如下命令启动 Web API 服务: ```powershell dotnet IdentityService.dll --urls "http://localhost:7711" ``` 监听端口:7711 ## OrderService 开启两个 OrderServcie 的进程, 在 `bin/net6.0`目录下打开 CMD,执行如下命令启动 Web API 服务: 第一个监听端口:7721 ```powershell dotnet OrderService.dll --urls "http://localhost:7721" ``` 第二个监听端口:7722 ```powershell dotnet OrderService.dll --urls "http://localhost:7722" ``` 更多信息参见 **docs** 文档