From e9555c1739896b7f6fd4a223c175e9f96815dea2 Mon Sep 17 00:00:00 2001 From: hanemile Date: Sat, 22 Dec 2018 16:13:05 +0100 Subject: simple hello world service --- main.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go new file mode 100644 index 0000000..4088fb1 --- /dev/null +++ b/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "fmt" + "log" + "net/http" + + "github.com/gorilla/mux" +) + +func indexHandler(w http.ResponseWriter, r *http.Request) { + _, _ = fmt.Fprintln(w, "Hello World\nThis is the manager managing all the processes") +} + +func main() { + router := mux.NewRouter() + + router.HandleFunc("/", indexHandler).Methods("GET") + log.Fatal(http.ListenAndServe(":80", router)) +} -- cgit 1.4.1