From d4dce83782b67236d2c8d99ffc9bdc89328bb5de Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 6 Oct 2019 20:11:44 +0200 Subject: get the status of all other containers --- src/http.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/http.go (limited to 'src/http.go') diff --git a/src/http.go b/src/http.go new file mode 100644 index 0000000..e29f13e --- /dev/null +++ b/src/http.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "net/http" + + "github.com/gorilla/mux" +) + +// setupHTTPServer defines a new http server +func setupHTTPServer() http.Server { + r := mux.NewRouter() + + r.HandleFunc("/", indexHandler) + + return http.Server{ + Addr: fmt.Sprintf("0.0.0.0:%d", *port), + Handler: r, + } +} + +// indexHandler handles the "/" endpoint +func indexHandler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintln(w, "This is the index Handler speaking! Prepare to HACK THE PLANET!") +} -- cgit 1.4.1