From ae5a1a37e5d560f05f1a0b05f0e7cbb355c53710 Mon Sep 17 00:00:00 2001 From: collin Date: Mon, 30 Jun 2025 12:37:33 +0200 Subject: [PATCH] changing directory structure so server is root and client is a sub-folder to make deployment easier --- server/controller.go => controller.go | 12 ++++++------ server/database.go => database.go | 0 server/go.mod => go.mod | 0 server/go.sum => go.sum | 0 server/main.go => main.go | 0 server/ntfy.go => ntfy.go | 0 server/ntfy_test.go => ntfy_test.go | 0 server/rsvp.go => rsvp.go | 0 server/rsvp_test.go => rsvp_test.go | 0 9 files changed, 6 insertions(+), 6 deletions(-) rename server/controller.go => controller.go (90%) rename server/database.go => database.go (100%) rename server/go.mod => go.mod (100%) rename server/go.sum => go.sum (100%) rename server/main.go => main.go (100%) rename server/ntfy.go => ntfy.go (100%) rename server/ntfy_test.go => ntfy_test.go (100%) rename server/rsvp.go => rsvp.go (100%) rename server/rsvp_test.go => rsvp_test.go (100%) diff --git a/server/controller.go b/controller.go similarity index 90% rename from server/controller.go rename to controller.go index bb80e69..eb6efac 100644 --- a/server/controller.go +++ b/controller.go @@ -78,22 +78,22 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { switch true { case r.Method == "GET" && r.URL.Path == "/": - getStaticFile("../client/index.html", "text/html", w) + getStaticFile("./client/index.html", "text/html", w) case r.Method == "GET" && r.URL.Path == "/rsvp": - getStaticFile("../client/rsvp.html", "text/html", w) + getStaticFile("./client/rsvp.html", "text/html", w) case r.Method == "GET" && r.URL.Path == "/rsvp_confirmed": - getStaticFile("../client/rsvp_confirmed.html", "text/html", w) + getStaticFile("./client/rsvp_confirmed.html", "text/html", w) case r.Method == "GET" && r.URL.Path == "/index.js": - getStaticFile("../client/index.js", "text/javascript", w) + getStaticFile("./client/index.js", "text/javascript", w) case r.Method == "GET" && r.URL.Path == "/rsvp.js": - getStaticFile("../client/rsvp.js", "text/javascript", w) + getStaticFile("./client/rsvp.js", "text/javascript", w) case r.Method == "GET" && r.URL.Path == "/style.css": - getStaticFile("../client/style.css", "text/css", w) + getStaticFile("./client/style.css", "text/css", w) case r.Method == "GET" && r.URL.Path == "/api/rsvps": if !isAuthorized(r) { diff --git a/server/database.go b/database.go similarity index 100% rename from server/database.go rename to database.go diff --git a/server/go.mod b/go.mod similarity index 100% rename from server/go.mod rename to go.mod diff --git a/server/go.sum b/go.sum similarity index 100% rename from server/go.sum rename to go.sum diff --git a/server/main.go b/main.go similarity index 100% rename from server/main.go rename to main.go diff --git a/server/ntfy.go b/ntfy.go similarity index 100% rename from server/ntfy.go rename to ntfy.go diff --git a/server/ntfy_test.go b/ntfy_test.go similarity index 100% rename from server/ntfy_test.go rename to ntfy_test.go diff --git a/server/rsvp.go b/rsvp.go similarity index 100% rename from server/rsvp.go rename to rsvp.go diff --git a/server/rsvp_test.go b/rsvp_test.go similarity index 100% rename from server/rsvp_test.go rename to rsvp_test.go