diff options
Diffstat (limited to 'cmd/webshopd/main.go')
| -rw-r--r-- | cmd/webshopd/main.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/webshopd/main.go b/cmd/webshopd/main.go new file mode 100644 index 0000000..519a299 --- /dev/null +++ b/cmd/webshopd/main.go @@ -0,0 +1,15 @@ +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)) +} |