From 05f01f07f514552169dcace361504de9c76f0cd0 Mon Sep 17 00:00:00 2001 From: Paul Yuknewicz Date: Mon, 27 Sep 2021 13:03:53 -0700 Subject: [PATCH 1/3] Refactored into node and python folders, updated readme --- hello-world/README.md | 5 +- hello-world/{ => node}/app.js | 0 hello-world/{ => node}/package.json | 0 hello-world/package-lock.json | 393 --------------------------- hello-world/{ => python}/app.py | 0 hello-world/python/requirements.txt | 1 + hello-world/{ => python}/sample.http | 0 hello-world/{ => python}/sample.json | 0 8 files changed, 4 insertions(+), 395 deletions(-) rename hello-world/{ => node}/app.js (100%) rename hello-world/{ => node}/package.json (100%) delete mode 100644 hello-world/package-lock.json rename hello-world/{ => python}/app.py (100%) create mode 100644 hello-world/python/requirements.txt rename hello-world/{ => python}/sample.http (100%) rename hello-world/{ => python}/sample.json (100%) diff --git a/hello-world/README.md b/hello-world/README.md index 2560c2bc1..e4d6c8690 100644 --- a/hello-world/README.md +++ b/hello-world/README.md @@ -118,6 +118,7 @@ expected_stdout_lines: expected_stderr_lines: name: "npm install" --> +Open a terminal window and navigate to the `./hello-world/node` directory and follow the steps below: 1. Install dependencies: @@ -305,7 +306,7 @@ This invokes the `/order` route, which calls out to the Redis store for the late ## Step 6 - Run the Python app with Dapr -Take a look at the Python App to see how another application can invoke the Node App via Dapr without being aware of the destination's hostname or port. In the `app.py` file you can find the endpoint definition to call the Node App via Dapr. +Take a look at the Python App in the `./hello-world/python` directory to see how another application can invoke the Node App via Dapr without being aware of the destination's hostname or port. In the `app.py` file you can find the endpoint definition to call the Node App via Dapr. ```python dapr_port = os.getenv("DAPR_HTTP_PORT", 3500) @@ -329,7 +330,7 @@ while True: time.sleep(1) ``` -Now open a **new** command line terminal and go to the `hello-world` directory. +Now open a **new** command line terminal and go to the `./hello-world/python` directory. -Open a terminal window and navigate to the `./hello-world/node` directory and follow the steps below: +Open a new terminal and navigate to the `./hello-world/node` directory and follow the steps below: 1. Install dependencies: @@ -204,7 +204,7 @@ dapr dashboard -p 9999 Now that Dapr and the Node.js app are running, you can send POST messages against it, using different tools. **Note**: here the POST message is sent to port 3500 - if you used a different port, be sure to update your URL accordingly. -First, POST the message by using Dapr cli in a new command line terminal: +First, POST the message by using Dapr cli in a new terminal: