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:
.gitignorespecifies intentionally untracked files that Git should ignore.docker-compose.ymlfile defining services, networks, and volumes for a Docker application.README.mddescription of the project.main.gomain file.controllersapi controllers.databaselocation responsible for database services.middlewareapi middlewares.migrationdatabase migrations.modelsapi models.routesapi routes.
- Before running the project you MUST build de containers in
docker-compose.ymlfile.