NBA Simulator

NBA Simulator Project With Go

Table of Contents
  1. Getting Started
  2. API Reference
  3. Contact

Getting Started

Prerequisites

  • Golang
  • Docker

Installation

  1. Clone the repo
    git clone https://github.com/muhammedikinci/nba_stats
    cd ./nba_stats
  2. Build docker compose file
    docker compose build --no-cache
  3. Run
    docker compose up
  • API can be restarted many times until MySQL is ready to accept the connection
    restart: on-failure

Installation Without Docker

This action needs the installation of PostgreSQL manually.

  1. Clone the repo

    git clone https://github.com/muhammedikinci/nba_stats
    cd ./nba_stats
  2. Install Go dependencies

    go mod download
  3. Start MYSQL Service and Create nba database

  4. Change database root password from repository

  5. Start API without build

    go run .

API Reference

GET /simulation

Getting current simulation status

curl --location --request GET '/simulation'

POST /simulation/start

Starting simulation

curl --location --request POST '/simulation/start'

DELETE /simulation/stop

Stopping simulation

curl --location --request DELETE '/simulation/stop'

GET /simulation/current-round

Getting current week stats.

curl --location --request GET '/simulation/current-round'

Contact

Muhammed İKİNCİ - muhammedikinci@outlook.com