From 5bdf1a81806b690e11d6e7ab5c6191c10482b7b9 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 31 Jan 2024 09:32:56 +0000 Subject: Initial commit for testing --- main.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go new file mode 100644 index 0000000..ce89e18 --- /dev/null +++ b/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "log" + "net/http" +) + +func home(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("Hello from DED")) +} + +func main() { + mux := http.NewServeMux() + mux.HandleFunc("/", home) + log.Print("starting server on :4000") + err := http.ListenAndServe(":4000", mux) + log.Fatal(err) +} -- cgit v1.2.3