Clone the application: git clone https://github.com/pdrosos/hyperledger-fabric-demo && cd hyperledger-fabric-demo/seller
Start the docker containers: docker-compose up -d
Application runs on http://localhost:7777
POST /shipments - create a new shipment
GET /shipments - get all shipments
GET /shipments/{trackingCode} - get current shipment state by tracking code
GET /shipments/{trackingCode}/history - get shipment history by tracking code
To download the application for development as a Go package inside your $GOPATH
, run go get github.com/pdrosos/hyperledger-fabric-demo/seller
.
To develop and debug the application locally you need Go 1.10 and Dep dependency manager installed locally on your machine.
Application uses dep to store its dependencies inside the vendor
directory.
To install the application dependencies, run or dep ensure
Run make fmt
to format your code according to the Go style guide. Do this before every commit.
Rebuild the application from source: make
Run the tests: make test
Application uses Golang 1.10. It can run inside the app
container.
To start the containers, go to the application directory: cd $GOPATH/src/github.com/pdrosos/hyperledger-fabric-demo/seller
and run docker-compose up -d