blue-jay / blueprint

Blueprint for your next web application in Go.

Home Page:https://blue-jay.github.io/

Repository from Github https://github.comblue-jay/blueprintRepository from Github https://github.comblue-jay/blueprint

Sample blueprint code as hosted local and on Heroku?

iamtoc opened this issue · comments

Please answer these questions when submitting your issue. Thanks!

  1. Which commit are you using?
    Latest commit f200a5c on Jul 16, 2017

  2. Which operating system, processor architecture, and Go version are you using (go env)?
    $ go version
    go version go1.10.1 darwin/amd64

     $ go env
     GOARCH="amd64"
     GOBIN=""
     GOCACHE="/Users/iamtoc/Library/Caches/go-build"
     GOEXE=""
     GOHOSTARCH="amd64"
     GOHOSTOS="darwin"
     GOOS="darwin"
     GOPATH="/Users/iamtoc/.go"
     GORACE=""
     GOROOT="/usr/local/opt/go/libexec"
     GOTMPDIR=""
     GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
     GCCGO="gccgo"
     CC="clang"
     CXX="clang++"
     CGO_ENABLED="1"
     CGO_CFLAGS="-g -O2"
     CGO_CPPFLAGS=""
     CGO_CXXFLAGS="-g -O2"
     CGO_FFLAGS="-g -O2"
     CGO_LDFLAGS="-g -O2"
     PKG_CONFIG="pkg-config"
     GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-        length=0 -fdebug-prefix-map=/var/folders/s5/thshrhp50wz8k6r7rflzj9tr0000gn/T/go-build032202548=/tmp/go-build -gno-record-gcc-switches -fno-common"
    
  3. What did you do?
    I am attempting to successfully run this app from Heroku. Very new to golang so everything is still foreign. After pushing my local bluepint to heroku, heroku's gin server seems to conflict with blueprint's server.go and not sure how to set things up to use either one or the other. Do you know of any sample projects wherein blue-jay/blueprint is hosted from heroku where i could see how things are set up for local and remote (heroku)?

This is the default code that starts of a Heroku golang project:

    port := os.Getenv("PORT")

if port == "80" {
	log.Fatal("$PORT must be set")
}

router := gin.New()
router.Use(gin.Logger())
router.LoadHTMLGlob("templates/*.tmpl.html")
router.Static("/static", "static")

router.GET("/", func(c *gin.Context) {
	c.HTML(http.StatusOK, "index.tmpl.html", nil)
})

router.Run(":" + port)

ps. Heroku is using govender if that is anything helpful.

Thanks.