21 lines
379 B
Go
21 lines
379 B
Go
package main
|
|
|
|
//Test
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"github.com/rs/cors"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println("Starting Werwolf Server")
|
|
mux := http.NewServeMux()
|
|
|
|
mux.HandleFunc("/werwolf/creategame", http.HandlerFunc(newGame))
|
|
mux.HandleFunc("/werwolf/joingame", http.HandlerFunc(joinGame))
|
|
|
|
corsHandler := cors.Default().Handler(mux)
|
|
http.ListenAndServe(":25566", corsHandler)
|
|
}
|