A Go port of the beloved fomo api.
Install goose. This is the database migratin tool. All migrations can be found under /migrations as incremental SQL scripts.
$ go get -u github.com/pressly/goose/cmd/goose
https://github.com/pressly/goose
Install go-swagger
$ brew tap go-swagger/go-swagger
$ brew install go-swagger
Refer to swagger markeup guide here: https://goswagger.io/generate/spec.html
Apply the migrations from the "migrations" directory.
$ goose postgres "user=postgres dbname=gomo_test sslmode=disable" up
Clean DB if needed and reapply goose up command above.
$ goose postgres "user=postgres dbname=gomo_test sslmode=disable" down-to 0
Refer to the Makefile targets: build, stage, etc.
Refer to the deploment configs.
From within the /api project
$ swagger generate spec -o ./fomo-swagger.json --scan-models
$ swagger serve -F=swagger fomo-swagger.json