add example of non-default ports (#2458)

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

Co-authored-by: Mark Fussell <markfussell@gmail.com>
This commit is contained in:
Hannah Hunter 2022-05-26 17:43:58 -05:00 committed by GitHub
parent ca8eb5f4c6
commit 1eaa79591e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -65,6 +65,28 @@ In the case of the hello world quickstart, two applications are launched, each w
}
```
If you're using ports other than the default ports baked into the code, set the `DAPR_HTTP_PORT` and `DAPR_GRPC_PORT` environment variables in the `launch.json` debug configuration. Match with the `httpPort` and `grpcPort` in the daprd `tasks.json`. For example, `launch.json`:
```json
{
// Set the non-default HTTP and gRPC ports
"env": {
"DAPR_HTTP_PORT": "3502",
"DAPR_GRPC_PORT": "50002"
},
}
```
`tasks.json`:
```json
{
// Match with ports set in launch.json
"httpPort": 3502,
"grpcPort": 50002
}
```
Each configuration requires a `request`, `type` and `name`. These parameters help VSCode identify the task configurations in the `.vscode/tasks.json` files.
- `type` defines the language used. Depending on the language, it might require an extension found in the marketplace, such as the [Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python).