/go_web

goでhtml/認証含むクリーンアーキテクチャwebappの雛形を作る

Primary LanguageGo

setup

1. if you have dep

$ dep ensure

2. else if you don't have dep

$ go get golang.org/x/crypto/bcrypt
$ go get github.com/rs/xid
$ go get github.com/pkg/errors
$ go get golang.org/x/net

run

$ cd go_web
$ go run main.go

deploy

NOTE: This is not nice way.

# change file name of main_gea.go to main.go
$ mv main.go ../ && mv main_gae.go main.go
$ gcloud app deploy
$ mv main.go main_gae.go && mv ../main.go . 

# concat
$ mv main.go ../ && mv main_gae.go main.go & gcloud app deploy & mv main.go main_gae.go && mv ../main.go .