Inititial commit

This commit is contained in:
Christian Barth
2018-04-29 01:25:38 +02:00
commit b4e2e4a52a
7 changed files with 295 additions and 0 deletions

19
main.go Normal file
View File

@@ -0,0 +1,19 @@
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)
}