See: microzon-auth
In go paths are important. Ensure that you checkout the project as described.
- Install go (>= 1.5) as described in the tutorial
- Mac users might just use homebrew instead:
brew install go
- Mac users might just use homebrew instead:
- Ensure that the
GOROOTenvironment variable is correctly set. Best set it in your.bashrcor.zshrc
- On Mac with homebrew this would be:
export GOROOT=/usr/local/Cellar/go/1.5.1/libexec
- Decide where you want to work and set your
GOPATHaccordingly.
- Best you create a workspace for each project you want to work on. E.g. like this:
mkdir -p $HOME/workspaces/microzon- Set your
GOPATHlike to:export GOPATH=$HOME/workspaces/microzon
- Checkout the git repo at the correct place:
-
In the setup about you should do:
``` mkdir -p $HOME/workspaces/microzon/src/github.com/leanovate cd $HOME/workspaces/microzon/src/github.com/leanovate git clone git@github.com:leanovate/microzon-auth-go.git cd microzon-auth-go ```
- Just use
make. - If you want to use an IDE like IntelliJ (with its go plugin). Use
$HOME/workspaces/microzonas project root.
- test the application:
curl localhost:8080/v1/certificatescurl localhost:8080/v1/certificates | jq -r .[0].skicurl localhost:8080/v1/certificates/<ski> - run server as docker:
make docker && docker run -ti --rm -p 8080:8080 microzon-auth