From 10cb2b542a5247ff73278930f836f3a1ff852a60 Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 5 Feb 2019 10:50:29 +0100 Subject: Init commit --- server.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 server.go diff --git a/server.go b/server.go new file mode 100644 index 0000000..5b76fa3 --- /dev/null +++ b/server.go @@ -0,0 +1,16 @@ +package main + +import ( + "fmt" + "log" + "net/http" +) + +func root( w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "It's the root ! [%s]{{%s}}", r.URL.Path[1:], r.Method) +} + +func main() { + http.HandleFunc("/", root) + log.Fatal(http.ListenAndServe(":8080", nil)) +} -- cgit v1.2.3