A simple RESTFUL API that provides endpoints to manage football leagues.

Prerequisites
Installation
- Clone this repository.
- Rename .env.example file to
.env and change the variable value with your desired value.
- Next, run the below command to migrate the database schema.
migrate -database "mysql://root:{YOUR_MYSQL_PASSWORD}@tcp(localhost:{YOUR_PORT})/{YOUR_DB_NAME}" -path db/migrations up
NOTE: Replace {YOUR_MYSQL_PASSWORD}, {YOUR_PORT}, {YOUR_DB_NAME} with the corresponding value in your .env file.
- Then run this command to synchronize all the dependencies.
go mod tidy
- After that run the command below to generate the required files for swaggo.
swag init
- Finally, run the project.
go run .
Usage
Open your browser and go to http://localhost:3000/swagger/index.html.
NOTE: Replace the 3000 with your defined PORT value in your .env file.
Hanif Naufal – @Digisata – hnaufal123@gmail.com
Distributed under the MIT license. See LICENSE for more information.
Contributing
- Fork this repository.
- Create your own branch (
git checkout -b fooBar).
- Commit your changes (
git commit -am 'Add some fooBar').
- Push to the branch (
git push origin fooBar).
- Create your awesome Pull Request.