- node.js
- git
- mysql
download node.js: https://nodejs.org/en/download/
clone repository: git clone https://github.com/JarneDel/Trampoline_Groep2_backend.git
run the install script: ./install.bat with database credentials (root has to be username)
./install.bat <database password> <database name>
run the start script: ./start.bat
./start.bat
index 0: button left
index 1: button right
index 2: both buttons
{
"button": {
"btn": [false, false, false]
}
}
{
"jump": "float", // coordinat e of highest point
"player": "int" // player index
}
calibration: {
"status": "calibrating" | "finished",
"player": "p1" | "p2"
}
end of calibration
calibrationSuccess: {
"indices": [i1, i2]
}
calibrationJumpDetected : {
kinectIndex: i,
playerIndex: calibratingPlayer
}
URL: http://localhost:3000/username
Content-type: application/json
response-example: "LonelyHat"
response: .png image
POST http://localhost:3000/username/avatar
Content-Type: application/json
{
"id": {{id}}
}
### get avatar
GET http://localhost:3000/username/avatar/{{id}}
Content-Type: application/json