diff options
author | Matthew Lemon <y@yulqen.org> | 2024-01-31 09:32:56 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-01-31 09:32:56 +0000 |
commit | 5bdf1a81806b690e11d6e7ab5c6191c10482b7b9 (patch) | |
tree | 00640c28940dafb0720d132d58c0b32954886eb2 |
Initial commit for testing
-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) +} |