summaryrefslogtreecommitdiffstats
path: root/cmd/buthd/main.go
diff options
context:
space:
mode:
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))
+}