diff --git a/fabcar/go/fabcar.go b/fabcar/go/fabcar.go index f75c6dd3..0b1ffb93 100644 --- a/fabcar/go/fabcar.go +++ b/fabcar/go/fabcar.go @@ -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) diff --git a/fabcar/go/runfabcar.sh b/fabcar/go/runfabcar.sh new file mode 100755 index 00000000..13792521 --- /dev/null +++ b/fabcar/go/runfabcar.sh @@ -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