Skip to content

Commit

Permalink
feat: support Let's Encrypt tls.
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy committed Apr 3, 2017
1 parent 719be4e commit b19dfa5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions auto-tls/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package main

import (
"github.com/gin-gonic/gin"
)

func main() {
r := gin.Default()

// Ping handler
r.GET("/ping", func(c *gin.Context) {
c.String(200, "pong")
})

// Listen and Server in 0.0.0.0:443
r.RunAutoTLS(":443", "/var/www/.cache", "example.com")
}

0 comments on commit b19dfa5

Please sign in to comment.