Skip to content

Commit

Permalink
[FAB-5155]Fix README.md in "balance-transfer" example
Browse files Browse the repository at this point in the history
The README in "balance-transfer" should be fixed in the section:
https://github.com/hyperledger/fabric-samples/tree/master/
balance-transfer#running-the-sample-program

1. Broken link
There is a link to "Sample REST APIs Requests" which is broken.
This is linked to non-existent path on fabric-sdk-node repository.
I believe the intended link is to
https://github.com/hyperledger/fabric-samples/tree/master/
balance-transfer#sample-rest-apis-requests

2. Instruction to start node application.
There is no instruction to start node application.
If we execute the REST APIs according to the current README,
we can't get any responses since node application is not working.
We need to execute the following steps before calling REST APIs.

 - npm install
 - PORT=4000 node app

fix repo names

Change-Id: I9ec0ec18bb36addd6c8371481dc8cfe645053ec6
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
  • Loading branch information
yuki-kon authored and christo4ferris committed Jul 19, 2017
1 parent f9c2954 commit 6cce07c
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions balance-transfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A sample Node.js app to demonstrate **__fabric-client__** & **__fabric-ca-client
* Download docker images

```
cd fabric-sdk-node/examples/balance-transfer/
cd fabric-samples/balance-transfer/
docker-compose -f artifacts/docker-compose.yaml pull
```

Expand Down Expand Up @@ -40,15 +40,29 @@ docker-compose -f artifacts/docker-compose.yaml up
```
##### Terminal Window 2

* Execute the REST APIs from the section [Sample REST APIs Requests](https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer#running-the-sample-program)
* Install the fabric-client and fabric-ca-client node modules

```
npm install
```

* Start the node app on PORT 4000

```
PORT=4000 node app
```

##### Terminal Window 3

* Execute the REST APIs from the section [Sample REST APIs Requests](https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer#sample-rest-apis-requests)


### Option 2:

##### Terminal Window 1

```
cd fabric-sdk-node/examples/balance-transfer
cd fabric-samples/balance-transfer
./runApp.sh
Expand All @@ -67,7 +81,7 @@ instructions [https://stedolan.github.io/jq/](https://stedolan.github.io/jq/)

With the application started in terminal 1, next, test the APIs by executing the script - **testAPIs.sh**:
```
cd fabric-sdk-node/examples/balance-transfer
cd fabric-samples/balance-transfer
./testAPIs.sh
Expand Down

0 comments on commit 6cce07c

Please sign in to comment.