logbook-app
The REST API is made in Java with SpringBoot. It is used to communicate with the blockchain running either on the same or another system.
Even though there is already a running instance of the chaincode which can be accessed with the files in the wallet folder, if you want to use your own chaincode, remember to change the wallet/connection.yml and wallet/alice.id files to point to your own kubernetes cluster.
More on this in the chaincode folder.
Locate into the rest-api directory and (optionally) run the integration tests to check if a connection to the blockchain can be established:
cd rest-api
mvn package -Pintegration-testsBuild the docker image:
docker build -t logbook-app-rest-api .Run the docker image:
docker run -p 8080:8080 logbook-app-rest-apiLocate into the rest-api directory and (optionally) run the tests to check if a connection to the blockchain can be established:
cd rest-api
mvn testRun the application:
mvn spring-boot:runMake sure that the wallet folder is in the root directory of the project.
java -Ddummy.mode=true -jar target/logbookappApi-0.0.1-SNAPSHOT.jar```http://localhost:8080/tour-app/tours/allice/```