mirror of https://github.com/dapr/quickstarts.git
2.2 KiB
2.2 KiB
Service Invocation
In this quickstart, you'll create a checkout service and an order processor service to demonstrate how to use the service invocation API. The checkout service uses Dapr's http proxying capability to invoke a method on the order processing service.
Visit this link for more information about Dapr and service invocation.
This quickstart includes one checkout service:
- Node client service
checkout
And one order-processor service:
- Node order-processor service
order-processor
Run Node order-processor with Dapr
- Open a new terminal window and navigate to
order-processor
directory and install dependencies:
cd service_invocation/javascript/http/order-processor
npm install
- Run the Node order-processor app with Dapr:
cd service_invocation/javascript/http/order-processor
dapr run --app-port 5001 --app-id order-processor --app-protocol http --dapr-http-port 3501 -- npm start
Run Node checkout with Dapr
- Open a new terminal window and navigate to
checkout
directory and install dependencies:
cd service_invocation/javascript/http/checkout
npm install
- Run the Node checkout app with Dapr:
cd service_invocation/javascript/http/checkout
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- npm start