bugfix set port number
This commit is contained in:
parent
fdb30c7169
commit
e37b0a9329
1 changed files with 3 additions and 2 deletions
|
|
@ -256,6 +256,7 @@ func NewHostCommand() *cobra.Command {
|
|||
}(gameState)
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*") // Allow CORS for all origins
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
resp := map[string]string{
|
||||
|
|
@ -265,8 +266,8 @@ func NewHostCommand() *cobra.Command {
|
|||
json.NewEncoder(w).Encode(resp)
|
||||
})
|
||||
|
||||
log.INFO.Print("Hosting Battlesnake HTTP server on :6969")
|
||||
log.INFO.Print(http.ListenAndServe(":6969", nil))
|
||||
log.INFO.Print("Hosting Battlesnake HTTP server on :8080")
|
||||
log.INFO.Print(http.ListenAndServe(":8080", nil))
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue