Slides for Chicago Ultimate Go Meetup, October 18:
http://go-talks.appspot.com/github.com/kkeuning/cug/slides/gatt.slide
Video of the meetup: https://vimeo.com/196251649
aka, "generate all the things!"
An Introduction to Goa for Microservices and SPAs
go get github.com/kkeuning/cug
Install present
go get golang.org/x/net
go get golang.org/x/tools
go install golang.org/x/tools/cmd/present
cd $GOPATH/src/github.com/kkeuning/cug/slides
$GOPATH/bin/present
Now point your browser to localhost:3999 to view the slides.
go get -u github.com/goadesign/goa/...
go get github.com/goadesign/gorma
Check out the v1.0.0 tag of goa for best compatibility with my examples.
cd $GOPATH/src/github.com/goadesign/goa
git checkout tags/v1.0.0
cd goagen
go install
go get github.com/goadesign/examples
go get github.com/goadesign/goa-cellar
go get github.com/goadesign/gorma-cellar
go get github.com/kkeuning/reduxa
Don't forget to get this repo also if you have not already:
go get github.com/kkeuning/cug
My fork of goa-cellar adds support for cors:
cd $GOPATH/src/github.com/goadesign/goa-cellar
git remote add kkeuning https://github.com/kkeuning/goa-cellar
git remote update
git checkout -t kkeuning/cors
My fork of gorma cellar adds several extras for the demo:
cd $GOPATH/src/github.com/goadesign/gorma-cellar
git remote add kkeuning https://github.com/kkeuning/gorma-cellar
git remote update
git checkout -t kkeuning/chicago
docker build -t gorma-cellar .
Fire up the React example, and connect it to gorma-cellar (or goa-cellar if you prefer, docker-compose will use gorma-cellar):
cd $GOPATH/src/github.com/kkeuning/cug/examples/react-goa-cellar
docker-compose build
docker-compose up
cd $GOPATH/src/github.com/goadesign/gorma-cellar/seeder
go build
bash seeder.sh
Point your browser to http://0.0.0.0:2015/ and click Bottles to connect to the api.
I suggest doing this with you browser developer tools open recording network activity to get a feel for the interactions with the cellar api. Also, the Chrome Redux devtools are nice and enabled for the example.
Swagger UI: https://github.com/swagger-api/swagger-ui
Bootprint (Static Swagger UI alternative) https://github.com/bootprint/bootprint
Vegeta: https://github.com/tsenart/vegeta
Baloo (end to end api testing): https://github.com/h2non/baloo
Chrome Redux devtools: https://github.com/zalmoxisus/redux-devtools-extension
Restful API Guidelines: http://zalando.github.io/restful-api-guidelines/
JSON API Specification: http://jsonapi.org/