package main

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)
}
