changing directory structure so server is root and client is a sub-folder to make deployment easier

This commit is contained in:
collin 2025-06-30 12:37:33 +02:00
parent 12d842bd80
commit ae5a1a37e5
No known key found for this signature in database
9 changed files with 6 additions and 6 deletions

View file

@ -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) {