diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ed3b07 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.test diff --git a/backslash b/backslash new file mode 100755 index 0000000..242836c Binary files /dev/null and b/backslash differ diff --git a/cmd/backslash/main.go b/cmd/backslash/main.go new file mode 100644 index 0000000..99528ba --- /dev/null +++ b/cmd/backslash/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "io" + "log" + "net/http" +) + +func healthHandler(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, "ok") +} + +func routes(internalMux *http.ServeMux) { + internalMux.HandleFunc("/health", healthHandler) +} + +func main() { + backslashMux := http.NewServeMux() + routes(backslashMux) + log.Fatal(http.ListenAndServe(":8080", backslashMux)) +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..c27def6 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module tea.ahmza.com/ahmza.com/backslash + +go 1.27