28 lines
461 B
Go
28 lines
461 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"mchess_server/server"
|
|
"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", cert_file, key_file, nil)
|
|
if err != nil {
|
|
log.Println(err)
|
|
}
|
|
|
|
log.Println("We ended")
|
|
}
|
|
|
|
func HandleFuncWrapper(a func()) {
|
|
a()
|
|
}
|