From 932d5a4b0cf2dd9d3cb413bd953e57abf5c6531f Mon Sep 17 00:00:00 2001 From: Takuma TAKEUCHI Date: Thu, 11 Mar 2021 08:11:58 +0900 Subject: [PATCH] fix(VerifierFactory): add README on run-transaction Signed-off-by: Takuma TAKEUCHI --- examples/run-transaction/README.md | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 examples/run-transaction/README.md diff --git a/examples/run-transaction/README.md b/examples/run-transaction/README.md new file mode 100644 index 0000000000..28bec8ca49 --- /dev/null +++ b/examples/run-transaction/README.md @@ -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"]]}' +``` \ No newline at end of file