quickstarts/configuration/csharp/http/README.md

2.2 KiB

Dapr Configuration API

In this quickstart, you'll create a microservice which makes use of Dapr's Configuration API. Configuration items are key/value pairs containing configuration data such as app ids, partition keys, database names etc. The service gets configuration items from the configuration store and subscribes for configuration updates.

Visit this link for more information about Dapr and Configuration API.

Note: This example leverages HTTP requests only. If you are looking for the example using the Dapr Client SDK (recommended) click here.

This quickstart includes one service:

  • Dotnet service order-processor

Run order-updater app

Note: order-updater app adds configuration items to the configuration store and keeps updating their value to simulate dynamic changes to configuration data. You need to start and keep it running before running order-processor service.

  1. Navigate to order-updater directory.
  2. Check the Readme to start the app and keep it running in the terminal.
cd ./../../order-updater
go run .
  1. This will add configuration items to redis config store and keep updating their values.

Run order-processor

  1. Open a new terminal and navigate to order-processor directory.
  2. Run the service app with Dapr.
cd ./order-processor
dapr run --app-id order-processor-http --components-path ../../../components/ --app-port 7001 -- dotnet run --project .