Skip to content

Latest commit

 

History

History
78 lines (61 loc) · 1.89 KB

README.md

File metadata and controls

78 lines (61 loc) · 1.89 KB

fluke goal / Glückstor

An application to track your table soccer score.

Online at https://fluke.cfapps.io/

Build and run

Prerequisite:

  • Install Maven 3.x.
  • Install Java 8.
  • Install and start a MySQL or MariaDB server.
  • Create an empty database fluke.

Clone project:

git clone ssh://[email protected]:7999/rd/fluke-goal.git
cd fluke-goal

Set your MySQL / MariaDB connection properties in class fluke-goal-rest/src/main/resources/application.properties

Build project:

export JAVA_HOME=/path/to/jdk-8
mvn package [-DskipTests]

Start REST service:

java -jar fluke-goal-rest/target/fluke-goal-rest-0.1.0-SNAPSHOT.jar

Start Vaadin GUI:

Since the REST service is running on port 8080 by default you have to set another port for the Vaadin GUI:

java -Dserver.port=8090 -jar fluke-goal-vaadin-gui/target/fluke-goal-vaadin-gui-0.1.0-SNAPSHOT.jar

Test REST service

Use the account created with the vaadin GUI for NAME and PASSWORD.

Add a player:

curl -u NAME:PASSWORD -d '{  "firstName" : "Frodo",  "lastName" : "Baggins" }' \
-i -X POST -H "Content-Type:application/json" \
 http://localhost:8080/service/player

Get all player:

curl -u NAME:PASSWORD http://localhost:8080/service/player

Get a single player by id:

curl -u NAME:PASSWORD http://localhost:8080/service/player/1

Add a game:

curl -u NAME:PASSWORD \
-d '{  "redOffensiveId" : "1",  "redDefensiveId" : "2", "blueOffensiveId" : "3", "blueDefensiveId" : "4"}' \
-i -X POST -H "Content-Type:application/json"  http://localhost:8080/service/game/create

Database

Entity–relationship model of the fluke database:

ERM of the the fuke database