Skip to content

lambtron/ladder

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ladder

A light-weight Elo rating web app.

Installing

Required technologies:

  • node 0.12.x
  • mongo
  • browserify
$ git clone https://github.com/lambtron/ladder.git
$ cd ladder
$ mongod
$ make

Deploy to Heroku

After you have cloned and went into the root of the directory:

$ heroku create
$ git push heroku master
$ heroku addons:add mongolab
$ heroku open

Or:

Deploy

Usage

API Routes

GET /api/list

Get the list of all players in the database. This is a sample response:

[
  {
    name: 'BeastLee',
    rating: 1500,
    createdAt: 'Sun Mar 22 2015 13:49:28 GMT-0700 (PDT)',
    gif: 'http://media.giphy.com/media/I5xVnGJRHZZf2/giphy.gif',
    games: 1
  },
  {
    name: 'DinnerNugget',
    rating: 1800,
    createdAt: 'Sun Mar 22 2015 13:49:28 GMT-0700 (PDT)',
    gif: 'http://media.giphy.com/media/I5xVnGJRHZZf2/giphy.gif',
    games: 2
  }
]

POST /api/create

Create a new player in the database. Content-type is application/json with sample body below. All players start with rating at 1500.

{
  name: 'BeastLee'
}

POST /api/results

Create a new game result and update Elo ratings accordingly. Content type is application/json with sample body below.

{
  winner: 'BeastLee',
  loser: 'DinnerNugget'
}

POST /api/remove/:name

Remove player from database with name as the key. The name is case sensitive.

License (MIT)

WWWWWW||WWWWWW
 W W W||W W W
      ||
    ( OO )__________
     /  |           \
    /o o|    MIT     \
    \___/||_||__||_|| *
         || ||  || ||
        _||_|| _||_||
       (__|__|(__|__|

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A light-weight Elo rating web app.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages