package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.LoadHTMLGlob("templates/*") r.Static("/static", "./static/") r.GET("/", func(c *gin.Context) { c.HTML(http.StatusOK, "index.html", nil) }) r.GET("/capybaras", func(c *gin.Context) { c.HTML(http.StatusOK, "capybaras.html", nil) }) r.GET("/dogs", func(c *gin.Context) { c.HTML(http.StatusOK, "dogs.html", nil) }) r.Run(":8080") }