summaryrefslogtreecommitdiffstats
path: root/cmd/buthd/main.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-03-06 16:31:54 -0500
committerSam Anthony <sam@samanthony.xyz>2026-03-06 16:31:54 -0500
commitd8671aa47dd0472b9779918a7a9cdddf9bfde355 (patch)
tree8f3a202b23fa8e50191ac299fff67453cea7d17c /cmd/buthd/main.go
parent0dda0350dec5e82be8e5a7767c7f0a56c0d48c94 (diff)
downloadbuth-d8671aa47dd0472b9779918a7a9cdddf9bfde355.zip
doc: architecture and authentication
Diffstat (limited to 'cmd/buthd/main.go')
-rw-r--r--cmd/buthd/main.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmd/buthd/main.go b/cmd/buthd/main.go
new file mode 100644
index 0000000..60ab749
--- /dev/null
+++ b/cmd/buthd/main.go
@@ -0,0 +1,16 @@
+// Buthd is the API server.
+package main
+
+import (
+ "fmt"
+ "html"
+ "log"
+ "net/http"
+)
+
+func main() {
+ http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
+ })
+ log.Fatal(http.ListenAndServe(":8081", nil))
+}