1. Clone this project inside your GOPATH src file
$ git clone https://github.com/titan2903/book-app-go.git book-app
$ cd book-app
2. Install Prerequisite
- Install go-migrate
https://github.com/golang-migrate/migrate
for running migration
3. Migration
- Run below command to run migration
$ migrate -path migration -database "mysql://user:password@tcp(host:port)/dbname?query" up
- To create a new migration file
$ migrate create -ext sql -dir migration -seq name
- or execute command in
Makefile
$ make -f Makefile
4. Run below command to run app server
$ go run main.go