24 lines
290 B
Go
24 lines
290 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"mchess_server/server"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
|
|
http.HandleFunc("/", server.SocketHandler)
|
|
|
|
err := http.ListenAndServe("localhost:8080", nil)
|
|
if err != nil {
|
|
log.Println(err)
|
|
}
|
|
|
|
log.Println("We ended")
|
|
}
|
|
|
|
func HandleFuncWrapper(a func()) {
|
|
a()
|
|
}
|