diff options
author | ache <ache@ache.one> | 2019-02-05 10:50:29 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2019-02-05 10:50:29 +0100 |
commit | 10cb2b542a5247ff73278930f836f3a1ff852a60 (patch) | |
tree | 7abb424b779287dca4b4973ff14cf0829705e64e |
Init commit
-rw-r--r-- | server.go | 16 |
1 files changed, 16 insertions, 0 deletions
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)) +} |