Coder Social home page Coder Social logo

leaguey's Introduction

Leaguey

The Ultimate Match Score API.

Logo

Leaguey allows you to do the following

  • Fetch Historical Match Results.
  • Granulated Fetch based on Season and Division.
  • Generation of PDF of Results using query parameter format=pdf.
  • Store PDF for up to two days in the cloud.
  • Documentation with OpenAPI (https://leaguey.herokuapp.com/swagger-html).

Note: I have a deployed version of the aplication found here on Heroku

Images

Here are samples.

docs output

Built With

Getting Started

This application can be deployed locally by the following ways.

  • Using docker-compose
  • Using Docker
  • Using the local environment.

Prerequisites

If you are considering the first two options of deployment, you would need to have a local installation of mySQL. docker-compose automates the setting up of these prerequisites and is the prefered form of deployment.

Docker-compose

You need to run the project by running.

npm run make:up

or

docker-compose -f "docker-compose.yml" up -d --build

Docker

To run the application with docker, you need a local istallation of MySQL and the MYSQL_DATABASE already created. After satisfying the reuirement, run the following to build the image. Note: MYSQL_DATABASE will not be created automatically and would need to be manually created.

docker build --pull --rm -f "Dockerfile" -t leaguey:latest "."

and this to run the image.

docker run --rm -it \
    --network="host" \
    -e MYSQL_ROOT_PASSWORD='passworD' \
    -e MYSQL_USERNAME='root' \
    -e MYSQL_DATABASE='leaguey' \
    -e MYSQL_HOST='localhost' \
    -p 3000:3000/tcp \
    leaguey:latest

You can also pull the image from DockerHub with:

docker run --rm -it \
    --network="host" \
    -e MYSQL_ROOT_PASSWORD='passworD' \
    -e MYSQL_USERNAME='root' \
    -e MYSQL_DATABASE='leaguey' \
    -e MYSQL_HOST='localhost' \
    -p 3000:3000/tcp \
    teezzan/leaguey:latest

Local Environment

Foremost, you have to clone this repository and install all the dependencies with the following commands.

git clone https://github.com/teezzan/Leaguey.git
cd Leaguey
npm install

Rename the .env.example to .env and customize it to your local machines specifications. Note: MYSQL_DATABASE will not be created automatically and would need to ba manually created.

Run npm run make:serve to start the local server.

NPM scripts

  • npm run make:up: Uses Docker-compose to spring up server
  • npm run make:test: Run tests
  • npm run make:build: Builds the Typescript code and deploy locally
  • npm run make:serve: Run tests

API Reference/Documentation

A swagger documentation can be found at http://localhost:3000/swagger-html

Authors

Taiwo Yusuf

leaguey's People

Contributors

teezzan avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tweedoriginal

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.