Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 1.5 KB

README.md

File metadata and controls

44 lines (27 loc) · 1.5 KB

Seller App

Installation

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

Endpoints

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

For developers

Download

To download the application for development as a Go package inside your $GOPATH, run go get github.com/pdrosos/hyperledger-fabric-demo/seller.

Local development

To develop and debug the application locally you need Go 1.10 and Dep dependency manager installed locally on your machine.

Install dependencies

Application uses dep to store its dependencies inside the vendor directory.
To install the application dependencies, run or dep ensure

Format code

Run make fmt to format your code according to the Go style guide. Do this before every commit.

Install

Rebuild the application from source: make

Tests

Run the tests: make test

Docker container to run the application

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