goapp-scaffold

module
v0.0.0-...-27a5f49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2017 License: MIT

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL