package main import ( // "log" "net/http" "os" "github.com/gin-gonic/gin" _ "github.com/heroku/x/hmetrics/onload" ) func main() { port := os.Getenv("PORT") if port == "" { // log.Fatal("$PORT must be set") port = "8080" } router := gin.New() router.Use(gin.Logger()) router.LoadHTMLGlob("templates/*.html") router.Static("/static", "static") router.GET("/", func(c *gin.Context) { c.HTML(http.StatusOK, "jp.index.html", nil) }) router.Run(":" + port) }