based on
echo
router
- to rename your project replace "go-template" in go.mod and in all imports (optional)
- 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
Download exe from releases choose
amd64
from - https://github.com/golang-migrate/migrate/releases and choose
- Create migration
migrate create -ext .sql -dir migrations [name-migration]
- Migrate or use
scripts/migrate-up.bat
orscripts/migrate-down.bat
be sure place migrate.exe into
./bin/migrate.exe
migrate.exe -path ./migrations -database "mysql://root:12345@/test" -verbose up