chore: update
Some checks failed
Build and Push Server / build-and-push (push) Failing after 4m8s

This commit is contained in:
Max Richter
2025-11-04 12:26:38 +01:00
parent 851babe1e0
commit cc19724277
3 changed files with 3 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ cmd = "go build -o ./tmp/marka-server ./cmd/marka-server"
bin = "./tmp/marka-server"
# Command to run the application with arguments.
full_bin = "./tmp/marka-server -root=/home/max/Notes/resources -addr=:8080 -playground-root=./playground"
full_bin = "MARKA_API_KEY='SECRET' ./tmp/marka-server -root=/home/max/Notes/resources -addr=:8080 -playground-root=./playground"
# Watch these file extensions.
include_ext = ["go", "http"]

View File

@@ -2,6 +2,7 @@ package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
@@ -62,6 +63,7 @@ func main() {
must(err)
apiKey := os.Getenv("MARKA_API_KEY")
fmt.Println(apiKey)
http.Handle("/", handler.NewHandler(fsAdapter, apiKey))
log.Printf("listening on %s, roots=%s", *addr, strings.Join(absRoots, ", "))

View File

@@ -99,7 +99,6 @@ func (h *Handler) post(w http.ResponseWriter, r *http.Request, target string) {
}
writeJSON(w, http.StatusOK, map[string]any{"success": true})
return
}
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {