summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-01-31 09:32:56 +0000
committerMatthew Lemon <y@yulqen.org>2024-01-31 09:32:56 +0000
commit5bdf1a81806b690e11d6e7ab5c6191c10482b7b9 (patch)
tree00640c28940dafb0720d132d58c0b32954886eb2
Initial commit for testing
-rw-r--r--go.mod3
-rw-r--r--main.go18
2 files changed, 21 insertions, 0 deletions
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..49a997d
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module github.com/yulqen/ded-go-core
+
+go 1.21.6
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)
+}