mirror of https://github.com/dapr/docs.git
				
				
				
			Apply suggestions, omit options object to use defaults
Co-authored-by: Shubham Sharma <shubhash@microsoft.com> Signed-off-by: Wralith <wralithdev@gmail.com>
This commit is contained in:
		
							parent
							
								
									59b9621a49
								
							
						
					
					
						commit
						6aaed4095e
					
				|  | @ -273,7 +273,7 @@ dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --resources | |||
| In the `checkout` publisher service, we're publishing the orderId message to the Redis instance called `orderpubsub` [(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({ daprHost, daprPort }); | ||||
| const client = new DaprClient(); | ||||
| 
 | ||||
| await client.pubsub.publish(PUBSUB_NAME, PUBSUB_TOPIC, order); | ||||
| console.log("Published data: " + JSON.stringify(order)); | ||||
|  |  | |||
|  | @ -177,7 +177,7 @@ dapr run --app-id order-processor --resources-path ../../../resources/ -- npm ru | |||
| The `order-processor` service writes, reads, and deletes an `orderId` key/value pair to the `statestore` instance [defined in the `statestore.yaml` component]({{< ref "#statestoreyaml-component-file" >}}). As soon as the service starts, it performs a loop. | ||||
| 
 | ||||
| ```js | ||||
| const client = new DaprClient({ daprHost, daprPort, communicationProtocol }) | ||||
| const client = new DaprClient() | ||||
| 
 | ||||
| // Save state into a state store | ||||
| await client.state.save(DAPR_STATE_STORE_NAME, state) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue