changing directory structure so server is root and client is a sub-folder to make deployment easier
This commit is contained in:
parent
04b1dcce25
commit
6a4f578cfc
9 changed files with 6 additions and 6 deletions
|
|
@ -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) {
|
||||
Loading…
Add table
Reference in a new issue