https://github.com/imthaghost/zleague
https://github.com/imthaghost/zleague
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/imthaghost/zleague
- Owner: imthaghost
- Created: 2020-10-02T06:52:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-02T06:53:13.000Z (almost 6 years ago)
- Last Synced: 2025-06-15T13:06:25.195Z (about 1 year ago)
- Language: Go
- Size: 5.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository contains all of the code that is related to the API of ZLeague
## Table of Contents
- [Prerequisites](#req)
- [Golang](#golang)
- [Docker](#docker)
- [Installation](#install)
- [Local Development](#localdev)
- [Enviornment Variables](#env)
- [Docker Compose](#compose)
- [Resources](#resources)
- [Backend Wiki](#wiki)
- [API Documentation](#apidocs)
- [Progress Tracker](#progresstracker)
# Installation
> Instructions to prepare you for development
1. Clone the project to your machine
```bash
# clone the repository
https://github.com/zleague/api.git
# cd into the project
cd api
# install all dependencies
go mod download
```
# Devlopment
> We assume you have the Docker Daemon running.
### Enviornment Variables
Create a .env file in project root directory
```bash
├── .env
├── .env.example
├── docker-compose.yml
├── go.mod
├── go.sum
├── main.go
└── ...
```
### Example
> Example Contents of the .env file
```bash
DB_URI=mongodb://localhost:27017
DB_USERNAME=root
DB_PASSWORD=AVeryStrongPassword1234
SERVER_USERNAME=backend
SERVER_PASSWORD=hackerman
```
Your .env file should have the same keys as the .env.example. If you create new enviornment variables update the .env.example.
### Docker Compose
```bash
# build the docker container and get it up and running
docker-compose up --build
```
### Starting server with Go
```bash
# go run
go run main.go
```