From a727108c82c7ee4c4c26bd74c93a5bc2dceb4809 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 18 Dec 2022 02:49:10 +0100 Subject: [PATCH] Add cert and key file to ListenAndServerTLS(). --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 34be6ce..548a973 100644 --- a/main.go +++ b/main.go @@ -6,11 +6,15 @@ import ( "net/http" ) +var cert_path = "/etc/letsencrypt/live/chess.sw-gross.de/" +var cert_file = cert_path + "fullchain.pem" +var key_file = cert_path + "privkey.pem" + func main() { http.HandleFunc("/", server.SocketHandler) - err := http.ListenAndServeTLS("wogehtspam.:8080", "path_to_cert_file", "path_to_key_file", nil) + err := http.ListenAndServeTLS("wogehtspam.:8080", cert_file, key_file, nil) if err != nil { log.Println(err) }