Table of Contents
This project is a simple rest API used for knowledge purposes. Some packages used in this project:
The project is complete, I don't want to modify anything, it's just a way to understand more about Go, Gorilla/Mux, and Gorm.
First you MUST have Go, Docker, Docker Compose and Git installed
- Clone the repository:
git clone git@github.com:BikutaDesu/go-rest-api.git
- Open the project:
cd go-rest-api
- Start the containers:
docker-compose up
- Run the project:
go run main.go
├── .gitignore
├── docker-compose.yml
├── README.md
├── main.go
├── controllers
│ └── controllers.go
├── database
│ └── db.go
├── middleware
│ └── middleware.go
├── migration
│ └── docker-database-initial.sql
├── models
│ └── people.go
├── routes
│ └── routes.go
A brief description of the layout:
.gitignore
specifies intentionally untracked files that Git should ignore.docker-compose.yml
file defining services, networks, and volumes for a Docker application.README.md
description of the project.main.go
main file.controllers
api controllers.database
location responsible for database services.middleware
api middlewares.migration
database migrations.models
api models.routes
api routes.
- Before running the project you MUST build de containers in
docker-compose.yml
file.