From 6d60104652a6beafb4ae91fcfcf9943b2560b5aa Mon Sep 17 00:00:00 2001 From: Daniel Hoffmann Date: Fri, 14 Jul 2017 13:17:54 -0700 Subject: [PATCH] Use appengine practices, should work on both standard and flexible --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index b8c0d73..7e70858 100644 --- a/main.go +++ b/main.go @@ -2,8 +2,11 @@ package main import ( + "net/http" "os" + "google.golang.org/appengine" + "github.com/goadesign/goa" "github.com/goadesign/goa/logging/log15" "github.com/goadesign/goa/middleware" @@ -35,9 +38,8 @@ func main() { app.MountAeController(service, h) // Start service, listen on port 8080 - if err := service.ListenAndServe(":8080"); err != nil { - service.LogError(err.Error()) - } + http.Handle("/", service.Mux) + appengine.Main() logger.Info("Exiting...") }