Update daprdocs/content/en/dotnet-sdk-docs/dotnet-development/dotnet-development-dapr-cli.md

Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
This commit is contained in:
Ryan Nowak 2021-03-16 20:57:36 -07:00 committed by GitHub
parent 4e9d7fd5ac
commit 02ed066ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ dapr run --app-id <app-id> --app-port <port> --components-path <components-path>
**Explanation:** this command will use `dapr run` to launch each service and its sidecar. The first half of the command (before `--`) passes required configuration to the Dapr CLI. The second half of the command (after `--`) passes required configuration to the `dotnet run` command.
> 💡 since you need to configure a unique port for each service, you can use this command to pass that port value to **both** Dapr and the service. `--urls http://localhost:<port>` will configure ASP.NET Core to listen for traffic on the provided port. Using configuration at the commandline is a more flexible approach than hardcoding a listening port elsewhere.
{{% alert title="💡 Ports" color="primary" %}}
Since you need to configure a unique port for each service, you can use this command to pass that port value to **both** Dapr and the service. `--urls http://localhost:<port>` will configure ASP.NET Core to listen for traffic on the provided port. Using configuration at the commandline is a more flexible approach than hardcoding a listening port elsewhere.
{{% /alert %}}
If any of your services do not accept HTTP traffic, then modify the command above by removing the `--app-port` and `--urls` arguments.