This is a simple Node.js application with a MySQL database to manage a scoreboard for a game. The application allows you to add, retrieve, and delete scores.
- Docker
- Docker Compose
git clone https://github.com/NeoGruber/game-scoreboard.git
cd game-scoreboard
docker-compose up -d --build
URL: /scores
Method: GET
Description: Retrieves all scores sorted from best to worst.
[
{
"id": 1,
"name": "player1",
"score": 100
},
{
"id": 2,
"name": "player2",
"score": 90
}
]
URL: /scores
Method: POST
Description: Adds a new score and returns all scores sorted from best to worst.
{
"name": "player1",
"score": 100
}
[
{
"id": 1,
"name": "player1",
"score": 100
},
{
"id": 2,
"name": "player2",
"score": 90
}
]
URL: /scores/:id
Method: DELETE
Description: Deletes a score by its id and returns all scores sorted from best to worst.
/scores/1
[
{
"id": 2,
"name": "player2",
"score": 90
}
]