The api that serves data to the tbbr web application and the tbbr android application.
$ cd $GOPATH/src/github.com/tbbr/
$ git clone https://github.com/tbbr/tbbr-api
On Mac OS X you can install the latest release via Homebrew:
$ brew install glide
On Ubuntu Precise(12.04), Trusty (14.04), Wily (15.10) or Xenial (16.04) you can install from our PPA:
sudo add-apt-repository ppa:masterminds/glide && sudo apt-get update
sudo apt-get install glide
For more information on glide checkout: https://github.com/Masterminds/glide
$ glide install
$ go get github.com/mattes/migrate
$ migrate -url postgres://username@host:port/test_database_name?sslmode=disable -path ./migrations up
Concrete example
$ migrate -url postgres://maazali@localhost:5432/tbbr_test?sslmode=disable -path ./migrations up
Update ~/.bash_profile to insert the following
export TBBR_DB_NAME=tbbr
export TBBR_DB_USER=maazali
export TBBR_DB_PASSWORD=(your username's password)
$ go build
$ ./tbbr-api
$ go test $(go list ./... | grep -v /vendor/)