Blockchained Kicker-Scores
Inspired by https://hackernoon.com/learn-blockchains-by-building-one-117428612f46
You can either use a JPA database backend or a Neo4j server. By default the JPA backend is enabled with an in-memory h2 database. To change that you need to modify the property 'database.type' to 'jpa' or 'neo4j'.
Install and setup a Neo4j server.
$ docker run \
--publish=7474:7474 --publish=7687:7687 \
--volume=$HOME/neo4j/data:/data \
--volume=$HOME/neo4j/logs:/logs \
neo4j:3.4
$ mvn clean install
$ java -Djava.security.egd=file:/dev/./urandom -jar target/kickchain-0.0.1-SNAPSHOT.jar
# default peers for the internal consensus service; comma separated list of ip-address:ports
consensus.peers=
# can be neo4j or jpa (default)
database.type=jpa
$ docker build . -t kickchain
$ docker run -p 8080:8080 kickchain
Navigate to
http://localhost:8080/
$ curl -X POST --header "Content-Type: text/plain" http://localhost:8080/admin/nodes/register -d 'localhost:8080'
$ curl -X --header "Content-Type: text/plain" POST http://localhost:8080/admin/nodes/unregister -d 'localhost:8080'
$ curl http://localhost:8080/admin/nodes/list
$ curl http://localhost:8090/admin/chain/Kickchain/resolve