From debd877540525c6123439ea72db040a230231d5c Mon Sep 17 00:00:00 2001 From: ZoRo Date: Sun, 31 Mar 2019 10:09:20 +0100 Subject: Hago server initial setup --- Makefile | 2 ++ haserver.go | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Makefile create mode 100644 haserver.go diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..75f9484 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +make: + go build haserver.go \ No newline at end of file diff --git a/haserver.go b/haserver.go new file mode 100644 index 0000000..21f3537 --- /dev/null +++ b/haserver.go @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "log" + "net/http" +) + +func handler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "IRC: irc.hacking.allowed.org:6667/6697\n") + fmt.Fprintf(w, "Hi there mister %s\n", r.URL.Path[1:]) + fmt.Fprintf(w, ` +24/3/2019 +People comes and people goes +But we stay hey ho + + +This happend ... +maybe new epoch is comming ... + + FreeArtMan +`) +} + +func main() { + fmt.Println("Start server") + http.HandleFunc("/",handler) + log.Fatal(http.ListenAndServe(":12345", nil)) +} \ No newline at end of file -- cgit v1.2.3