1
0
mirror of https://github.com/labstack/echo.git synced 2025-12-07 23:12:43 +02:00

Updated deps and docs

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2017-01-21 10:20:59 -08:00
parent 069e80b9e0
commit e8910be0ac
4 changed files with 13 additions and 10 deletions

View File

@@ -3,15 +3,17 @@ package main
import (
"net/http"
"golang.org/x/crypto/acme/autocert"
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
)
func main() {
e := echo.New()
// e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<your_domain>")
// Store the certificate to avoid issues with rate limits (https://letsencrypt.org/docs/rate-limits/)
// e.AutoTLSManager.Cache = autocert.DirCache("<path to store key and certificate>")
// e.AutoTLSManager.HostPolicy = autocert.HostWhitelist("<DOMAIN>")
// Cache certificates
e.AutoTLSManager.Cache = autocert.DirCache("/var/www/.cache")
e.Use(middleware.Recover())
e.Use(middleware.Logger())
e.GET("/", func(c echo.Context) error {