summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoRo <dos21h@gmail.com>2019-03-31 10:09:20 +0100
committerZoRo <dos21h@gmail.com>2019-03-31 10:09:20 +0100
commitdebd877540525c6123439ea72db040a230231d5c (patch)
treede1a74fca433d1a0dd997509188baf53ec582886
downloadhago-debd877540525c6123439ea72db040a230231d5c.tar.gz
hago-debd877540525c6123439ea72db040a230231d5c.zip
Hago server initial setup
-rw-r--r--Makefile2
-rw-r--r--haserver.go29
2 files changed, 31 insertions, 0 deletions
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