Compare commits
No commits in common. "3e8a4b8f870835f348efb12e19e6976723f5e2d4" and "25188a8bcff3af612615152fd27a12364f28b55f" have entirely different histories.
3e8a4b8f87
...
25188a8bcf
3 changed files with 2 additions and 19 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -1,14 +0,0 @@
|
|||
ARG GO_VERSION=1
|
||||
FROM golang:${GO_VERSION}-alpine as builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
COPY . .
|
||||
RUN go build -v -o /run-app ./cli/battlesnake/main.go
|
||||
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY --from=builder /run-app /usr/local/bin/
|
||||
CMD ["run-app", "host"]
|
||||
|
|
@ -4,8 +4,6 @@ import (
|
|||
"github.com/BattlesnakeOfficial/rules"
|
||||
)
|
||||
|
||||
// This is deprecated now because of db writes + caching
|
||||
|
||||
// Types used to implement the JSON API expected by the board client.
|
||||
|
||||
// JSON structure returned by the game status endpoint.
|
||||
|
|
|
|||
|
|
@ -256,7 +256,6 @@ 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{
|
||||
|
|
@ -266,8 +265,8 @@ func NewHostCommand() *cobra.Command {
|
|||
json.NewEncoder(w).Encode(resp)
|
||||
})
|
||||
|
||||
log.INFO.Print("Hosting Battlesnake HTTP server on :8080")
|
||||
log.INFO.Print(http.ListenAndServe(":8080", nil))
|
||||
log.INFO.Print("Hosting Battlesnake HTTP server on :6969")
|
||||
log.INFO.Print(http.ListenAndServe(":6969", nil))
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue