Files
Archivum/backend/internal/graph/server.go
brasse b e6b64e3344 feat: Archivum skeleton — Go/GraphQL backend + Vue 3 PWA frontend
Full project scaffold: multi-stage Dockerfile (ARM64/AMD64), AsciiDoc↔TipTap
bridge, Setup Wizard, CodeMirror source editor, Git-backed storage layer,
LDAP+JWT auth skeleton, Tailwind mobile-first layout, and VS Code build/push
tasks targeting registry at 192.168.0.19:5000.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 13:07:01 +02:00

29 lines
777 B
Go

package graph
import (
"net/http"
"github.com/brasse-b/archivum/internal/config"
)
// NewServer wires up the HTTP handler for the GraphQL endpoint.
// Replace the stub handler with the gqlgen-generated handler once
// `go generate ./...` has been run.
func NewServer(cfg *config.Config) http.Handler {
mux := http.NewServeMux()
// Placeholder — replace with generated gqlgen handler.
mux.HandleFunc("/graphql", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte(`{"data":{"systemStatus":"REQUIRE_SETUP"}}`))
})
// Simple health check.
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
})
return mux
}