Just a simple Express server that stores stepmania scores. Developed in Node 16.15.0
- Run
npm ci --omit=devto install the dependencies - Make 2 directories in the root folder.
_backupandscores - Create
alias.jsonin root directory - (Optional) Set environmental variable
PORTto run the server at different port (Default: 8765)
scoresdirectory will be used to store all the submitted scores_backupdirectory will be used to store backups of each submitted scores throughPOST /submitScore- By default, each endpoints will be given 200mb payload limit, if you needed more or less, please do configure yourself in the code
- Highscore page can be viewed on http://localhost:8765/
alias.jsonis used to manually map the song packs name. Useful when queryingGET /getScoreswithr_packquery. Format as shown below:
{
"player_name": {
"song_pack_name_on_user_score": "mapped_song_pack_name"
}
}Tip: You may use GET /getPackAliases to extract unique pack names from all players' scores.
npm start
The server uses port 8765 by default
| Endpoint | Content-Type | Query/Body |
|---|---|---|
| GET /getPackAliases | - | - |
| GET /getScores | GET query | r_song, r_pack, r_diff, sort |
| POST /submitScore | text/plain; charset=UTF-8 | xml data from Stats.xml |
| POST /submitScoreIndividual | x-www-form-urlencoded | player,pack,song,Difficulty,DateTime,Disqualified,Grade,MaxCombo,Modifiers,PercentDP,Score,HitMine,AvoidMine,CheckpointMiss,Miss,W5,W4,W3,W2,W1,CheckpointHit,OK |
curl -H "Content-Type: text/plain; charset=UTF-8" --data-binary "@Stats.xml" localhost:8765/submitScore
Command line live score viewer
Usage:
py viewer.py <profile_name> <score_type> <host>
Arguments:
profile_name Profile name which score to be submitted
score_type Accept: controller, pad
host (Optional) HTTP url to the server; Default: http://localhost:8765
Description:
The program will read everyone.dance.txt for stats every 1 seconds and provide scoring from the server