Capstone/ui/main.go

22 lines
436 B
Go
Raw Normal View History

2023-10-23 22:01:09 -04:00
package main
import (
2023-10-28 00:44:22 -04:00
"bytes"
2023-10-23 22:01:09 -04:00
"github.com/gin-gonic/gin"
2023-10-28 00:44:22 -04:00
"preston-baxter.com/capstone/frontend-service/templates"
2023-10-23 22:01:09 -04:00
)
func main() {
r := gin.Default()
r.GET("/", func(c *gin.Context) {
2023-10-28 00:44:22 -04:00
raw := []byte{}
buf := bytes.NewBuffer(raw)
2023-10-28 11:15:42 -04:00
templates.LandingPage(false).Render(c.Request.Context(), buf)
2023-10-28 00:44:22 -04:00
c.Data(200, "text/html", []byte(buf.String()))
2023-10-23 22:01:09 -04:00
})
r.Run() // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
}