https server

This commit is contained in:
m5r
2024-07-10 01:09:18 +02:00
parent ccaef7827c
commit 92cdddec9c
12 changed files with 360 additions and 70 deletions

View File

@@ -20,16 +20,16 @@ func main() {
certsClient := certs.NewCertsClient(n, account)
time.Sleep(5 * time.Second)
certsClient.RequestCertificate()
certsClient.RequestCertificates()
for {
// try to renew certificate every day
time.Sleep(24 * time.Hour)
certsClient.RequestCertificate()
certsClient.RequestCertificates()
}
}()
go http.ServeCertificate()
go http.ServeHttp()
n.StartServer()
}