Code Monkey home page Code Monkey logo

summoner-stats's Introduction

Summoner Stats

Summoner Stats is an NodeJS Express + ReactJS app that serves as a simple demonstration app for interacting with the Riot API to show recent League of Legends match history.

View the live sample here: https://summoner-stats.herokuapp.com/

Running Locally

To run summoner-stats locally, clone this repository and run the following command from the project's root directory:

Note: dotenv is utilized to load environment variables at runtime so you should place your Riot API key in a file called .env. A sample .env.sample file is provided as an example and includes the RIOT_API_URL variable which you should also copy into your .env file.

npm install && cd client && npm install
cd ../
npm run dev

The first command will install the server-side dependencies, switch to the client directory, and then install the dependencies for the client-side. After installing dependencies, switch back to the project's root directory and run npm run dev.

npm run dev will fire up both the server and client apps which can then be utilized via http://localhost:3000

Heroku Ready

package.json and Procfile together make this application ready to be published to Heroku immediately. The only manual work required is to set the environment variables for the Heroku app. Simply link the repository up to Heroku and deploy the master branch.

Testing

A few unit tests have been written for the client as a proof-of-concept, and could be further expanded to other pieces of the client code and even on to the server pieces, too.

To run the demo tests, switch to the client directory and run npm test

cd client && npm test

Caveats

The server will make a few requests to particular static-data endpoints on Riot's API - these endpoints are rate limited to fairly low limits per hour. Running the server multiple times may cause you to hit these rate limits and should be avoided.

Of course, other standard rate limits are in place and there is no caching of summoner results as this is just a simple demo. Running into rate limit constraints may interrupt the experience if encountered.

summoner-stats's People

Contributors

saundersalex avatar

Watchers

 avatar

Forkers

absingh927

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.