Skip to content

Commit

Permalink
fix(VerifierFactory): add README on run-transaction
Browse files Browse the repository at this point in the history
Signed-off-by: Takuma TAKEUCHI <takeuchi.takuma@fujitsu.com>
  • Loading branch information
takeutak committed Mar 18, 2021
1 parent 5ed3e96 commit 932d5a4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions examples/run-transaction/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# run-transaction

A proto-code of communication feature to http-type Validator for Verifier

## Setup for communication app with http-server

```
/// build ///
cd packages
vi config/default.json
-> edit applicationHostInfo.hostName (“http://xxx.xxx.xxx.xxx”) to the IP address of your server
npm install
npm run build
cd ../examples/run-transaction
npm install
npm run build
npm run init-run-transaction
npm run start
-> The run-transaction app will start on port 5034.
```

## Setup for stub server instead of http-type Validator

```
/// build ///
cd examples/run-transaction/supply-chain-app-stub
npm install
npx tsc
/// exec server ///
node app/app.js
```

## Execution to call API of http-type Validator

```
/// exec to call API ///
curl localhost:5034/api/v1/bl/run-transaction/ -XPOST -H "Content-Type: application/json" -d '{"businessLogicID":"j71S9gLN", "tradeParams": ["1111", "2222", "3333", "4444", "5555", ["6666-1", "6666-2"]]}'
```

0 comments on commit 932d5a4

Please sign in to comment.