usernamesalah / soccer-api

simpel soccerr api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SOCCER API DOCUMENTATION

This repository contains source code for Soccer API.

Getting Started

To run the project localy, make sure minimum requirements are fulfilled.

  • Go version 1.10 or higher
  • PostgreSQL version 12
  • Docker (optional) -- see here.

How To Run this Project

Since the project already use Go Module, I recommend to put the source code in any folder but GOPATH.

Running Without Docker

  1. Make sure Go is installed as global command (first time only)

  2. Clone this project and go to the root project to install all dependencies (first time only)

    // clone the repository
    > git clone https://github.com/usernamesalah/soccer-api.git
    
    // change directory to root project folder
    > cd soccer
    
    // install all the dependencies
    > make init   
  3. Running your PostgreSQL

  4. While still in root project build and run the app

    // build project
    > make build
    
    // source env
    > source .env.development
    
    // run project
    > ./bin/soccer
    
    // now go to http://localhost:8080/ in your browser to check the app.

Running from Docker Container

  1. Make sure Docker and Docker Compose is installed

  2. Run docker-compose up

  3. Build and run the app as described on the previous section.

Run the testing

    make test

API LIST

api list

for access POST , PUT and DELETE API you need to login with default (admin:admin)

API Documentation

We use swag to generate necearry Swagger files for API documentation. Everytime we run make build, the Swagger documentation will be updated.

To configure your API documentation, please refer to swag's declarative comments format and examples.

To access the documentation, please visit API DOCUMENTATION.

Repository Content

Tools Used

In this project, I use some tools listed below

About

simpel soccerr api


Languages

Language:Go 98.1%Language:Makefile 1.5%Language:Dockerfile 0.5%