Inititial commit
This commit is contained in:
19
main.go
Normal file
19
main.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user