gowebd/https.go

19 lines
355 B
Go
Raw Normal View History

package main
import (
"fmt"
"net/http"
)
func https() {
// http.HandleFunc("/", okHandler)
certPath := "/etc/letsencrypt/live/go.wit.com/fullchain.pem"
keyPath := "/etc/letsencrypt/live/go.wit.com/privkey.pem"
err := http.ListenAndServeTLS(":443", certPath, keyPath, nil)
if err != nil {
fmt.Println("Error starting HTTPS server:", err)
}
}