diff options
Diffstat (limited to '')
-rw-r--r-- | go.mod | 3 | ||||
-rw-r--r-- | main.go | 18 |
2 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,3 @@ +module github.com/yulqen/ded-go-core + +go 1.21.6 @@ -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) +} |