* Import Full Stack Asset Transfer Guide at commit fb554befdbbeff9e69159b54fce0b811603f29c7 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Update the workshop with a new WORKSHOP_PATH under fabric-samples Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Update the workshop with a new WORKSHOP_PATH under fabric-samples Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * missed a .git ignored directory on add Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Updates to run the workshop on the Apple M1 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Workaround for https://github.com/eslint/eslint/issues/15299 in the contract tslinter Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * Build an arch-specific CC images on M1 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * empty commit - force a build Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> * revert an accidental commit that was building the top-level asset-transfer as arm64 Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com> Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
1.7 KiB
Exercise: Run the client application
Note: This exercise requires the Fabric network and chaincode deployed in the Smart Contract Development exercises to be running.
Let's make sure we can successfully run the client application and get some familiarity with how to use it.
In a terminal window, navigate to the applications/trader-typescript directory. Then complete the following steps:
-
Install dependencies and build the client application.
npm install -
Set environment variables to point to resources required by the application.
export ENDPOINT=org1peer-api.127-0-0-1.nip.io:8080 export MSP_ID=org1MSP export CERTIFICATE=../../_cfg/uf/_msp/org1/org1admin/msp/signcerts/org1admin.pem export PRIVATE_KEY=../../_cfg/uf/_msp/org1/org1admin/msp/keystore/cert_sk -
Run the getAllAssets command to check the assets that currently exist on the ledger (if any).
npm start getAllAssets -
Run the transact command to create (and update / delete) some more sample assets.
npm start transact -
Run the getAllAssets command again to see the new assets recorded on the ledger.
npm start getAllAssets
These application CLI commands represent a simplified application that performs one action per call. Note that real world applications will typically be long running and will make calls to a contract on behalf of user requests.
Optional steps
Try using the create, read and delete commands to work with specific assets.
See the application Readme for details on how to use the commands.