summaryrefslogtreecommitdiffstats
path: root/cmd/buthd/main.go
blob: 60ab7494ceb3a596ab99dfab17ec27a193b6660c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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))
}