diff options
| author | Jeff Carr <[email protected]> | 2025-06-29 21:15:29 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-06-29 21:15:29 -0500 |
| commit | 4bc92ccddd52c0a7454247cb226ce085e62394e8 (patch) | |
| tree | 82c74485c62db923fde2cf4a3e5827e780c02a16 /https.go | |
initial start after split from gowebdv0.0.1
Diffstat (limited to 'https.go')
| -rw-r--r-- | https.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/https.go b/https.go new file mode 100644 index 0000000..00fca19 --- /dev/null +++ b/https.go @@ -0,0 +1,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) + } +} |
