https://github.com/jadbox/leaderboard-d
Simple game leaderboard app written in D using vide.d and Redis
https://github.com/jadbox/leaderboard-d
Last synced: 3 months ago
JSON representation
Simple game leaderboard app written in D using vide.d and Redis
- Host: GitHub
- URL: https://github.com/jadbox/leaderboard-d
- Owner: jadbox
- Created: 2015-01-14T00:13:54.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-14T01:54:52.000Z (over 11 years ago)
- Last Synced: 2025-01-14T11:41:26.050Z (over 1 year ago)
- Language: D
- Homepage:
- Size: 301 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Features**
* Uses vibe.d pipes for pooled multithreaded handling of concurrent client connections
* Event routing is done using array index lookup (bounded)
* Should work on any platform that DMD supports (Linux/Win/OSX)
**Requirements**
* Redis local running server
* [DMD](http://dlang.org/download.html) compiler for D
* [DUB](http://code.dlang.org/download) package manager for D
Note: DMD may already include DUB depending on the D install method.
**Clone, get dependencies and run:**
```
git clone git@github.com:jadbox/leaderboard-d.git
cd leaderboard-d
dub
```
**Test case:**
With [HTTPie](https://github.com/jakubroztocil/httpie), run the client test script: [./test.sh](https://github.com/jadbox/leaderboard-d/blob/master/test.sh)
**Notes:**
* Registering a new user only requires a name, as a playerID will be generated.
* Example: ```http POST localhost:3000 name=Don event:=1```
* Reponse: ```{
"name": "Don",
"playerID": 1,
"status": "Success: registered player"
}```
* Deleting users, requires event id 5:
* Example: ```http POST localhost:3000 playerID="1" event = 5```
* Reponse: ```{
"playerID": 1,
"status": "Success: deleted player"
}```
* All event actions use the (form) POST HTTP method
* New event ID route handlers can be added in the app.d file
* Server port is 3000 by default
* Server port is 3000 by default (test.sh uses this) but can be speficied using the parameter "port"
* Example: ```dub -- --port 3000```
_See project files for documentation._