2022-10-22 18:01:55 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2022-11-19 10:41:10 +00:00
|
|
|
"log"
|
2022-11-19 12:25:00 +00:00
|
|
|
"mchess_server/server"
|
2022-11-19 10:41:10 +00:00
|
|
|
"net/http"
|
2022-10-22 18:01:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2022-12-14 21:19:47 +00:00
|
|
|
|
2022-11-19 10:41:10 +00:00
|
|
|
http.HandleFunc("/", server.SocketHandler)
|
|
|
|
|
2022-12-18 01:41:35 +00:00
|
|
|
err := http.ListenAndServeTLS("wogehtspam.:8080", "path_to_cert_file", "path_to_key_file", nil)
|
2022-11-19 10:41:10 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Println(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
log.Println("We ended")
|
2022-10-22 18:01:55 +00:00
|
|
|
}
|
2022-12-14 21:19:47 +00:00
|
|
|
|
|
|
|
func HandleFuncWrapper(a func()) {
|
|
|
|
a()
|
|
|
|
}
|