Gin Skeleton is a simple boilerplate to kickstart a web server project based on Gin Framework
# start a web server listening on 0.0.0.0:8080
go run main.go
Run dep ensure
- Framework: gin-gonic/gin
- Dependency management: golang/dep
- Database ORM: jinzhu/gorm
- Database migration: rubenv/sql-migrate
- Leveled logs: golang/glog
- YAML support: go-yaml/yaml
- Testing toolkit: stretchr/testify
Edit the config.yml
with your own config
Create the database first
CREATE DATABASE IF NOT EXISTS `gin` DEFAULT CHARACTER SET utf8mb4;
Migrates the database to the most recent version available
./migrate.sh up
Undo a database migration
./migrate.sh down
Show migration status
./migrate.sh status
Create a new migration
./migrate.sh new a_new_migration