package main
import (
"html/template"
"github.com/gin-gonic/gin"
)
var html = template.Must(template.New("https").Parse(`
Https Test
Welcome, Ginner!
`))
func main() {
r := gin.Default()
r.SetHTMLTemplate(html)
r.GET("/welcome", func(c *gin.Context) {
c.HTML(200, "https", gin.H{
"status": "success",
})
})
// Listen and Server in https://127.0.0.1:8080
r.RunTLS(":8080", "./testdata/server.pem", "./testdata/server.key")
}