about summary refs log tree commit diff
path: root/src/rest-api/cmd/main.go
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-04-29 22:17:41 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-04-29 22:45:11 +0200
commit14c229c8e3c2a3e1c381747f556c78b0a15ef402 (patch)
tree462d902c79205f05b81059747727c1b283bd8f7e /src/rest-api/cmd/main.go
parentSwitch to k3s from kind (diff)
downloadfs-tracer-backend-14c229c8e3c2a3e1c381747f556c78b0a15ef402.tar.gz
fs-tracer-backend-14c229c8e3c2a3e1c381747f556c78b0a15ef402.tar.bz2
fs-tracer-backend-14c229c8e3c2a3e1c381747f556c78b0a15ef402.zip
Create dummy rest-api service
Diffstat (limited to '')
-rw-r--r--src/rest-api/cmd/main.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rest-api/cmd/main.go b/src/rest-api/cmd/main.go
index 94fb4bc..bfeb752 100644
--- a/src/rest-api/cmd/main.go
+++ b/src/rest-api/cmd/main.go
@@ -1,7 +1,14 @@
 package main
 
-import "fmt"
+import (
+	"fmt"
+	"net/http"
+)
 
 func main() {
-  fmt.Println("Hi!")
+  http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+  fmt.Fprint(w, "Hello, World!")
+ })
+
+  http.ListenAndServe(":8080", nil)
 }