This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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, ", "))
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user