mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Update samples to use published fabric-rest-sample (#626)
Signed-off-by: James Taylor <jamest@uk.ibm.com>
This commit is contained in:
parent
a492d7d241
commit
5edae7c444
6 changed files with 8 additions and 12 deletions
|
|
@ -132,13 +132,9 @@ npm run start:dev
|
|||
|
||||
### Docker image
|
||||
|
||||
Alternatively, run the following commands in the `fabric-rest-sample/asset-transfer-basic/rest-api-typescript` directory to start the sample in a Docker container
|
||||
It's also possible to use the [published docker image](https://github.com/hyperledger/fabric-samples/pkgs/container/fabric-rest-sample) to run the sample
|
||||
|
||||
Build the Docker image
|
||||
|
||||
```shell
|
||||
docker build -t fabric-rest-sample .
|
||||
```
|
||||
Clone the `fabric-samples` repository and change to the `fabric-samples/asset-transfer-basic/rest-api-typescript` directory before running the following commands
|
||||
|
||||
Create a `.env` file to configure the server for the test network (make sure `TEST_NETWORK_HOME` is set to the fully qualified `test-network` directory and `AS_LOCAL_HOST` is set to `false` so that the server works inside the Docker Compose network)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ services:
|
|||
- fabric_test
|
||||
|
||||
nodeapp:
|
||||
image: 'fabric-rest-sample'
|
||||
image: 'ghcr.io/hyperledger/fabric-rest-sample:latest'
|
||||
command: ['start:dotenv']
|
||||
ports:
|
||||
- 3000:3000
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Invoke and query chaincode:
|
|||
./network chaincode query '{"Args":["ReadAsset","1"]}'
|
||||
```
|
||||
|
||||
Access the blockchain with a [REST API](https://github.com/hyperledgendary/fabric-rest-sample/tree/main/asset-transfer-basic/rest-api-typescript#rest-api):
|
||||
Access the blockchain with a [REST API](https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-basic/rest-api-typescript):
|
||||
```
|
||||
./network rest-easy
|
||||
```
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Launching fabric-rest-sample application:
|
|||
✅ - Constructing fabric-rest-sample connection profiles ...
|
||||
✅ - Starting fabric-rest-sample ...
|
||||
|
||||
The fabric-rest-sample has started. See https://github.com/hyperledgendary/fabric-rest-sample/tree/main/asset-transfer-basic/rest-api-typescript#rest-api for additional usage.
|
||||
The fabric-rest-sample has started. See https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-basic/rest-api-typescript for additional usage.
|
||||
To access the endpoint:
|
||||
|
||||
export SAMPLE_APIKEY=97834158-3224-4CE7-95F9-A148C886653E
|
||||
|
|
@ -37,7 +37,7 @@ $ curl -s --header "X-Api-Key: ${SAMPLE_APIKEY}" http://localhost/api/assets | j
|
|||
}
|
||||
]
|
||||
|
||||
$ open https://github.com/hyperledgendary/fabric-rest-sample/tree/main/asset-transfer-basic/rest-api-typescript#rest-api
|
||||
$ open https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-basic/rest-api-typescript
|
||||
```
|
||||
|
||||
## Guide for Gateway Client Applications
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ spec:
|
|||
spec:
|
||||
containers:
|
||||
- name: main
|
||||
image: ghcr.io/hyperledgendary/fabric-rest-sample
|
||||
image: ghcr.io/hyperledger/fabric-rest-sample
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: LOG_LEVEL
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ function launch_rest_sample() {
|
|||
rollout_rest_sample
|
||||
|
||||
log ""
|
||||
log "The fabric-rest-sample has started. See https://github.com/hyperledgendary/fabric-rest-sample/tree/main/asset-transfer-basic/rest-api-typescript#rest-api for additional usage."
|
||||
log "The fabric-rest-sample has started. See https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-basic/rest-api-typescript for additional usage."
|
||||
log "To access the endpoint:"
|
||||
log ""
|
||||
log "export SAMPLE_APIKEY=97834158-3224-4CE7-95F9-A148C886653E"
|
||||
|
|
|
|||
Loading…
Reference in a new issue