- Clone your forked repository
git clone https://github.com/USERNAME/live-score cd live-score
- Set Username and a password as environment variables
export LIVE_USERNAME=your_username export LIVE_PASSWORD=your_password
- Build the project
mvn install
- Run the generated jar file
java -jar target/livescore.jar
- Visit your app at http://localhost:9090
Since this doesn't have a GUI you have to connect it using an API client.
POST /login HTTP/1.1
Host: localhost:9090
Content-Type: application/json
{
"username": "your_username",
"password": "your_password"
}
POST /update-test-match HTTP/1.1
Host: localhost:9090
Content-Type: application/json
{
"status": "lorem ipsum",
"teamOneFirstInning": {
"score": 10,
"overs": 2,
"balls": 3,
"wickets":3,
"playerOne": {
"name": "Kusal Mendis",
"isBatting": true
},
"playerTwo": {
"name": "Lasith Malinga",
"isBatting": false
},
"currentInning": true
},
"teamTwoFirstInning": {
"score": 10,
"overs": 50,
"balls": 0,
"wickets":3,
"playerOne": {
"name": "Kusal Mendis",
"isBatting": true
},
"playerTwo": {
"name": "Lasith Malinga",
"isBatting": false
},
"currentInning": false
},
"teamOneSecondInning": {
"score": 0,
"overs": 0,
"balls": 0,
"wickets":0,
"playerOne": {
"name": "",
"isBatting": true
},
"playerTwo": {
"name": "",
"isBatting": false
},
"currentInning": false
},
"teamTwoSecondInning": {
"score": 0,
"overs": 0,
"balls": 0,
"wickets":0,
"playerOne": {
"name": "",
"isBatting": true
},
"playerTwo": {
"name": "",
"isBatting": false
},
"currentInning": false
}
}
A working demo can be found at src/main/resources/static/app.js
-
Run the generated jar file in debug mode.
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar target/livescore.jar
-
Connect it with your favorite IDE
- Choose
Run
>Edit Configurations
from the menu bar. - Select the
+
mark in the upper lef corner to add a new configuration. - Choose
Remote
option. - Set port to
5005
- Hit apply
- Run the jenerated jar file in debug mode.
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar target/livescore.jar
- Hit
Debug
icon or press^ + D
to start debugging.
- Choose
-
Enjoy!