/gae-go-image-example

source code for post GAE go Image API for GCS

Primary LanguageGo

GAE Golang: Image API example

use "google.golang.org/appengine/image" to serve image from GCS

Screenshot

screenshot

Getting Started

git clone repo

$ git clone git@github.com:cage1016/gae-go-image-example.git

install go package

$ go get -u github.com/echo-contrib/pongor
$ go get -u github.com/labstack/echo
$ go get -u golang.org/x/net
$ go get -u google.golang.org/appengine

replace project settings

main.go

const (
	Bucket           = "<your-gae-default-bucket>"
	NotFoundImageURL = "img-api-example/img404.jpg"
)

makefile

ACCOUNT = <your-google-account>
PROJECT = <your-gcp-project>
VERSION = <your-gcp-project-version>

running locally

blobstore image api does not work locally

// running locally
$ make run

// deploy
$ make update