mirror of https://github.com/dapr/docs.git
[quickstarts] Make code snippets consistent; link to repo (#2340)
* link to repo; edit code snippet Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> * remove first person; capitalize Quickstarts Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> * capitalize quickstarts Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com> * remove first person Signed-off-by: Hannah Hunter <hannahunter@microsoft.com> Co-authored-by: Mark Fussell <markfussell@gmail.com>
This commit is contained in:
parent
95b30ffd88
commit
d518e0e5d1
|
@ -32,7 +32,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/pub_sub).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -202,7 +202,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've set up:
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/pub_sub).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -236,6 +236,8 @@ dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --component
|
|||
In the `checkout` publisher service, we're publishing the orderId message to the Redis instance called `order_pub_sub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
|
||||
|
||||
```js
|
||||
const client = new DaprClient(DAPR_HOST, DAPR_HTTP_PORT);
|
||||
|
||||
await client.pubsub.publish(PUBSUB_NAME, PUBSUB_TOPIC, order);
|
||||
console.log("Published data: " + JSON.stringify(order));
|
||||
```
|
||||
|
@ -357,7 +359,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've set up:
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/pub_sub).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -512,7 +514,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/pub_sub).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -673,7 +675,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/pub_sub).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -702,6 +704,8 @@ dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --component
|
|||
In the `checkout` publisher, we're publishing the orderId message to the Redis instance called `order_pub_sub` [(as defined in the `pubsub.yaml` component)]({{< ref "#pubsubyaml-component-file" >}}) and topic `orders`. As soon as the service starts, it publishes in a loop:
|
||||
|
||||
```go
|
||||
client, err := dapr.NewClient()
|
||||
|
||||
if err := client.PublishEvent(ctx, PUBSUB_NAME, PUBSUB_TOPIC, []byte(order)); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -711,7 +715,7 @@ fmt.Sprintf("Published data: ", order)
|
|||
|
||||
### Step 3: Subscribe to topics
|
||||
|
||||
In a new terminal window, from the root of the quickstarts clone directory,
|
||||
In a new terminal window, from the root of the Quickstart clone directory,
|
||||
navigate to the `order-processor` directory.
|
||||
|
||||
```bash
|
||||
|
|
|
@ -32,7 +32,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/service_invocation).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -153,7 +153,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/service_invocation).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -269,7 +269,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/service_invocation).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -391,7 +391,7 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/service_invocation).
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
@ -505,7 +505,8 @@ For this example, you will need:
|
|||
|
||||
### Step 1: Set up the environment
|
||||
|
||||
Clone the sample we've provided.
|
||||
Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/service_invocation).
|
||||
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/quickstarts.git
|
||||
|
|
Loading…
Reference in New Issue