Skip to content

golang ready-to-go template with echo router, gorm

Notifications You must be signed in to change notification settings

Nikeweke/go-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Golang ready-to-go template

based on echo router

Quick launch

  1. to rename your project replace "go-template" in go.mod and in all imports (optional)
  2. duplicate ".env.example" and rename it to ".env"
# build and run app (auto download deps)
> ./scripts/run.bat

# bundle prod app into folder (it can take some time at first time)
> ./scripts/build.bat

# default value = 8000
> ./app --port 8000 

Golang migrate

Download exe from releases choose amd64 from - https://github.com/golang-migrate/migrate/releases and choose

  1. Create migration
migrate create -ext .sql -dir migrations [name-migration]
  1. Migrate or use scripts/migrate-up.bat or scripts/migrate-down.bat

be sure place migrate.exe into ./bin/migrate.exe

migrate.exe -path ./migrations -database "mysql://root:12345@/test" -verbose up

About

golang ready-to-go template with echo router, gorm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published