Showing
1 changed file
with
5 additions
and
0 deletions
@@ -28,6 +28,7 @@ import ( | @@ -28,6 +28,7 @@ import ( | ||
28 | "context" | 28 | "context" |
29 | "io" | 29 | "io" |
30 | "net/http" | 30 | "net/http" |
31 | + "os" | ||
31 | "strings" | 32 | "strings" |
32 | 33 | ||
33 | "gitlab.weird-web-workers.org/golang/logger" | 34 | "gitlab.weird-web-workers.org/golang/logger" |
@@ -80,6 +81,10 @@ func NewServer(addr string, log *logger.Logger) (server *Server) { | @@ -80,6 +81,10 @@ func NewServer(addr string, log *logger.Logger) (server *Server) { | ||
80 | } | 81 | } |
81 | 82 | ||
82 | server.mux.Handle( | 83 | server.mux.Handle( |
84 | + "/", | ||
85 | + http.FileServer(http.Dir(os.Getenv("DOCUMENT_ROOT"))), | ||
86 | + ) | ||
87 | + server.mux.Handle( | ||
83 | "/api/0.0.1/", | 88 | "/api/0.0.1/", |
84 | http.StripPrefix("/api/0.0.1/", &handler), | 89 | http.StripPrefix("/api/0.0.1/", &handler), |
85 | ) | 90 | ) |
Please
register
or
login
to post a comment