summaryrefslogtreecommitdiff
path: root/https.go
blob: 00fca1952267183736b15ecf650d284f5f21b0d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)
	}
}