This repository contains a starter template for rapid microservice development with Go. It uses Gin and GORM.
- Get the repository from GitHub
git clone [email protected]:henvo/golang-gin-gorm-starter.git
- Install dependencies
go get
- Run app
go run main.go
- Rename all instances of
github.com/henvo/golang-gin-gorm/
to your package - Switch from the default database driver (mysql) to sqlite, postgresql, ...
- PORT (Default:
8080
) - GIN_MODE (Default:
debug
) - DATABASE_HOST (Default:
localhost:3306
) - DATABASE_NAME (Default:
go_test
) - DATABASE_USERNAME (Default:
golang
) - DATABASE_PASSWORD (Default:
golang
)