Categorygithub.com/michilu/goapp-scaffold
module
0.0.0-20170715091033-27a5f49a35e6
Repository: https://github.com/michilu/goapp-scaffold.git
Documentation: pkg.go.dev

# README

goapp-scaffold

A scaffold for Google App Engine Golang.

wercker status

clone repository

$ cd `goapp env GOPATH`
$ mkdir -p src/github.com/MiCHiLU
$ cd src/github.com/MiCHiLU
$ git clone --depth 1 https://github.com/MiCHiLU/goapp-scaffold.git
$ cd goapp-scaffold

or, add to git remote and merge:

$ git remote add scaffold https://github.com/MiCHiLU/goapp-scaffold
$ git fetch --depth=1 scaffold master
$ git checkout scaffold/master .

dep

$ go get -u github.com/golang/dep/...
$ dep init
$ dep ensure

start server

$ dev_appserver.py backend

with goa

Install goa:

$ go get -u github.com/goadesign/goa/...

Generate code:

$ goagen app -d github.com/MiCHiLU/goapp-scaffold/design
$ goagen swagger -d github.com/MiCHiLU/goapp-scaffold/design

with swagger

Get swagger-ui:

$ make swagger-ui

Open swagger-ui.

$ open "http://localhost:8080/swagger-ui/?url=http://localhost:8080/swagger.json"

Deploy to the Google App Engine

Create a Google App Engine application:

$ CLOUDSDK_CORE_PROJECT=<APP-ID> gcloud app create

Create TaskQueue and Cron:

$ CLOUDSDK_CORE_PROJECT=<APP-ID> gcloud app deploy backend/queue.yaml
$ CLOUDSDK_CORE_PROJECT=<APP-ID> gcloud app deploy backend/cron.yaml

Deploy to Google App Engine:

$ goapp deploy backend/app.yaml

Get an OAuth 2.0 refresh token:

$ jq .refresh_token ~/.appcfg_oauth2_tokens

Then set to an APP_ENGINE_TOKEN of the application environment variables on the Wercker CI.

# Packages

No description provided by the author
No description provided by the author