This is a schemaless rest api
- GNU Make
- Golang ~= 1.12.4
- Docker ~= 19.03.1
- Docker Compose ~= 1.24.1
1. Installing Go with Homebrew
brew install goNote: You can install Go by whichever mean you see fit. Homebrew is just our choice of preference.
2. Setup your GOPATH
# Source this in your favorite shell .rc (.bashrc, .zshrc, etc...)
# or just export it on the shell you're currently working on
export GOPATH=$HOME/place/to/put/my/go/codeNote: If you're using IDE embedded test runners like Goland configure this as an environment variable
# Make sure GO111MODULE=on is set on your working shell
# The process should be the same as how you setup your GOPATH (See section 2.)
export GO111MODULE=on
# You can use go built-in tool to clone the code
go get -d -v github.com/mazti/restless
# Or man-handling it
mkdir -p $GOPATH/src/github.com/mazti
git clone https://github.com/mazti/restless.git $GOPATH/src/github.com/mazti/restlessWe love localizing project level dependencies so now we're going to download them using a go module utility.
# Make sure you're inside of the project directory first
go mod vendorWe usually refer to this practice as vendoring, hence the name of the utility
go test ./...
Install
# Make sure you're inside of the project directory first
$GOPATH/src/github.com/mazti/restless make installCommands
# Helps
restless help
# Run meta service (both grpc and http)
restless meta
# Run meta service (grpc only)
restless meta -g