This boilerplate are intended to be a starting point on starting a new go web app that uses mvc structure
Technology Used:
- Gin
- Gorm - PostgreSQL as Default Driver
By default database are disabled, you will need to configure the database connection first.
Notes :
import (
"fmt"
"github.com/arifluthfi16/gomvcboilerplate/config"
"github.com/arifluthfi16/gomvcboilerplate/routers"
"github.com/arifluthfi16/gomvcboilerplate/services"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
)
If you wanted to push the code into another repo, it is best to change the module name and also the import statement.
To run the project:
- Clone the project
git clone https://github.com/arifluthfi16/gomvcboilerplate/
- Install modules
go mod download
- Run the project
go run main.go