Add a prefix to paths.

change-name
Robert Jacob 5 years ago
parent 46e51c820d
commit 8e99d53687
  1. 6
      cmd/spaceapi-server/main.go

@ -28,9 +28,9 @@ func main() {
log.Fatalf("Error reading state: %s", err)
}
http.Handle("/status.json", handleReadStatus(status))
http.Handle("/status/state", handleSetState(status))
http.Handle("/", http.RedirectHandler("/status.json", http.StatusFound))
http.Handle("/spaceapi/status.json", handleReadStatus(status))
http.Handle("/spaceapi/status/state", handleSetState(status))
http.Handle("/", http.RedirectHandler("/spaceapi/status.json", http.StatusFound))
log.Printf("Listening on %s...", addr)
log.Fatal(http.ListenAndServe(addr, nil))

Loading…
Cancel
Save