mirror of https://github.com/dapr/quickstarts.git
				
				
				
			Changed port numbers and app ids
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
This commit is contained in:
		
							parent
							
								
									ab47f2fb42
								
							
						
					
					
						commit
						ac52d39dfd
					
				| 
						 | 
				
			
			@ -46,7 +46,7 @@ sleep: 10
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id order-processor --components-path ../../../components/ --app-port 7001 -- dotnet run --project .
 | 
			
		||||
dapr run --app-id order-processor-http --components-path ../../../components/ --app-port 7001 -- dotnet run --project .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -82,11 +82,12 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
    
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id checkout --components-path ../../../components/ -- dotnet run --project .
 | 
			
		||||
dapr run --app-id checkout-http --components-path ../../../components/ -- dotnet run --project .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id order-processor-http
 | 
			
		||||
dapr stop --app-id checkout-http
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,7 +46,7 @@ sleep: 10
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id order-processor --components-path ../../../components/ --app-port 7001 -- dotnet run --project .
 | 
			
		||||
dapr run --app-id order-processor-sdk --components-path ../../../components/ --app-port 7002 -- dotnet run --project .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -82,11 +82,12 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
    
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id checkout --components-path ../../../components/ -- dotnet run --project .
 | 
			
		||||
dapr run --app-id checkout-sdk --components-path ../../../components/ -- dotnet run --project .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id order-processor-sdk
 | 
			
		||||
dapr stop --app-id checkout-sdk
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,7 +6,7 @@
 | 
			
		|||
      "dotnetRunMessages": "true",
 | 
			
		||||
      "launchBrowser": true,
 | 
			
		||||
      "launchUrl": "swagger",
 | 
			
		||||
      "applicationUrl": "http://localhost:7001",
 | 
			
		||||
      "applicationUrl": "http://localhost:7002",
 | 
			
		||||
      "environmentVariables": {
 | 
			
		||||
        "ASPNETCORE_ENVIRONMENT": "Development"
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,7 +44,7 @@ sleep: 15
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
cd ./order-processor
 | 
			
		||||
dapr run --app-port 6002 --app-id order-processor --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run .
 | 
			
		||||
dapr run --app-port 6001 --app-id order-processor --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -78,12 +78,12 @@ sleep: 15
 | 
			
		|||
    
 | 
			
		||||
```bash
 | 
			
		||||
cd ./checkout
 | 
			
		||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run .
 | 
			
		||||
dapr run --app-id checkout-http --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id checkout-http
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -61,7 +61,7 @@ func postOrder(w http.ResponseWriter, r *http.Request) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
func main() {
 | 
			
		||||
	appPort := "6002"
 | 
			
		||||
	appPort := "6001"
 | 
			
		||||
	if value, ok := os.LookupEnv("APP_PORT"); ok {
 | 
			
		||||
		appPort = value
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -43,7 +43,7 @@ sleep: 15
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
cd ./order-processor
 | 
			
		||||
dapr run --app-port 6001 --app-id order-processor --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run .
 | 
			
		||||
dapr run --app-port 6002 --app-id order-processor-sdk --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- go run .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -77,12 +77,12 @@ sleep: 15
 | 
			
		|||
    
 | 
			
		||||
```bash
 | 
			
		||||
cd ./checkout
 | 
			
		||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run .
 | 
			
		||||
dapr run --app-id checkout-sdk --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- go run .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id checkout-sdk
 | 
			
		||||
dapr stop --app-id order-processor-sdk
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -18,7 +18,7 @@ var sub = &common.Subscription{
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
func main() {
 | 
			
		||||
	appPort := "6001"
 | 
			
		||||
	appPort := "6002"
 | 
			
		||||
	if value, ok := os.LookupEnv("APP_PORT"); ok {
 | 
			
		||||
		appPort = value
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -50,7 +50,7 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
```bash
 | 
			
		||||
cd ./order-processor
 | 
			
		||||
 dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
 dapr run --app-port 8080 --app-id order-processor-http --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
```
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
### Run Java message publisher app with Dapr
 | 
			
		||||
| 
						 | 
				
			
			@ -83,11 +83,11 @@ sleep: 10
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
cd ./checkout
 | 
			
		||||
 dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
 dapr run --app-id checkout-http --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
```
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id checkout-http
 | 
			
		||||
dapr stop --app-id order-processor-http
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -50,7 +50,7 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
```bash
 | 
			
		||||
cd ./order-processor
 | 
			
		||||
 dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
 dapr run --app-port 8080 --app-id order-processor-sdk --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
```
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -84,11 +84,11 @@ sleep: 10
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
cd ./checkout
 | 
			
		||||
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
dapr run --app-id checkout-sdk --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
 | 
			
		||||
```
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id checkout-sdk
 | 
			
		||||
dapr stop --app-id order-processor-sdk
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
    
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id checkout --components-path ../../../components/  --app-port 5001 -- node .
 | 
			
		||||
dapr run --app-id order-processor-http --components-path ../../../components/  --app-port 5001 -- node .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -76,12 +76,12 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
    
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id checkout --components-path ../../../components/  --app-port 5001 -- node .
 | 
			
		||||
dapr run --app-id checkout-http --components-path ../../../components/  --app-port 5001 -- node .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id checkout-http
 | 
			
		||||
dapr stop --app-id order-processor-http
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
    
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-port 5001 --app-id order-processing --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- npm run start
 | 
			
		||||
dapr run --app-port 5002 --app-id order-processing-sdk --app-protocol http --dapr-http-port 3501 --components-path ../../../components -- npm run start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -76,12 +76,12 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
    
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- npm run start
 | 
			
		||||
dapr run --app-id checkout-sdk --app-protocol http --dapr-http-port 3500 --components-path ../../../components -- npm run start
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id checkout-sdk
 | 
			
		||||
dapr stop --app-id order-processor-sdk
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,7 +3,7 @@ import { DaprServer } from '@dapr/dapr';
 | 
			
		|||
const DAPR_HOST = process.env.DAPR_HOST || "http://localhost";
 | 
			
		||||
const DAPR_HTTP_PORT = process.env.DAPR_HTTP_PORT || "3501";
 | 
			
		||||
const SERVER_HOST = process.env.SERVER_HOST || "127.0.0.1";
 | 
			
		||||
const SERVER_PORT = process.env.APP_PORT || 5001;
 | 
			
		||||
const SERVER_PORT = process.env.APP_PORT || 5002;
 | 
			
		||||
 | 
			
		||||
async function main() {
 | 
			
		||||
  const server = new DaprServer(SERVER_HOST, SERVER_PORT, DAPR_HOST, DAPR_HTTP_PORT);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,7 +43,7 @@ sleep: 10
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id order-processor --components-path ../../../components/ --app-port 6001 -- python3 app.py
 | 
			
		||||
dapr run --app-id order-processor-http --components-path ../../../components/ --app-port 6001 -- python3 app.py
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -77,12 +77,12 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
    
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id checkout --components-path ../../../components/ -- python3 app.py
 | 
			
		||||
dapr run --app-id checkout-http --components-path ../../../components/ -- python3 app.py
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id checkout-http
 | 
			
		||||
dapr stop --app-id order-processor-http
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id order-processor --components-path ../../../components/ --app-port 6001 -- uvicorn app:app --port 6001
 | 
			
		||||
dapr run --app-id order-processor-sdk --components-path ../../../components/ --app-port 6001 -- uvicorn app:app --port 6002
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
| 
						 | 
				
			
			@ -77,12 +77,12 @@ sleep: 10
 | 
			
		|||
-->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr run --app-id checkout --components-path ../../../components/ -- python3 app.py
 | 
			
		||||
dapr run --app-id checkout-sdk --components-path ../../../components/ -- python3 app.py
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<!-- END_STEP -->
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
dapr stop --app-id checkout
 | 
			
		||||
dapr stop --app-id order-processor
 | 
			
		||||
dapr stop --app-id checkout-sdk
 | 
			
		||||
dapr stop --app-id order-processor-sdk
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,7 +5,7 @@ import os
 | 
			
		|||
 | 
			
		||||
app = Flask(__name__)
 | 
			
		||||
 | 
			
		||||
app_port = os.getenv('APP_PORT', '6001')
 | 
			
		||||
app_port = os.getenv('APP_PORT', '6002')
 | 
			
		||||
 | 
			
		||||
# Register Dapr pub/sub subscriptions
 | 
			
		||||
@app.route('/dapr/subscribe', methods=['GET'])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue