mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 07:25:10 +00:00
run fabcar go (#232)
* add go/runfabcar.sh Signed-off-by: Acmefocus <107723772@qq.com> * add set hosts and env in go Signed-off-by: Acmefocus <107723772@qq.com> * Update fabcar/startFabric.sh Co-authored-by: Sijo Cherian <sijocherian@users.noreply.github.com> Signed-off-by: Acmefocus <107723772@qq.com> * Update startFabric.sh delete set /etc/hosts Signed-off-by: Acmefocus <107723772@qq.com> * add environment variable DISCOVERY_AS_LOCALHOST Signed-off-by: Acmefocus <107723772@qq.com> Co-authored-by: Sijo Cherian <sijocherian@users.noreply.github.com>
This commit is contained in:
parent
1249207afd
commit
59acacbef1
2 changed files with 16 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
os.Setenv("DISCOVERY_AS_LOCALHOST", "true")
|
||||
wallet, err := gateway.NewFileSystemWallet("wallet")
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to create wallet: %s\n", err)
|
||||
|
|
|
|||
15
fabcar/go/runfabcar.sh
Executable file
15
fabcar/go/runfabcar.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
ENV_DAL=`echo $DISCOVERY_AS_LOCALHOST`
|
||||
|
||||
echo "ENV_DAL:"$DISCOVERY_AS_LOCALHOST
|
||||
|
||||
if [ "$ENV_DAL" != "true" ]
|
||||
then
|
||||
export DISCOVERY_AS_LOCALHOST=true
|
||||
fi
|
||||
|
||||
echo "DISCOVERY_AS_LOCALHOST="$DISCOVERY_AS_LOCALHOST
|
||||
|
||||
echo "run fabcar..."
|
||||
|
||||
go run fabcar.go
|
||||
Loading…
Reference in a new issue