Added FileServer

graph-rework
noah metz 2023-06-19 13:37:59 -06:00
parent 4b8ed52232
commit b67fef84ee
1 changed files with 3 additions and 1 deletions

@ -1017,7 +1017,9 @@ func (server * GQLServer) Init(abort chan error) bool {
http_handler, ws_handler := MakeGQLHandlers(server) http_handler, ws_handler := MakeGQLHandlers(server)
mux.HandleFunc("/gql", http_handler) mux.HandleFunc("/gql", http_handler)
mux.HandleFunc("/gqlws", ws_handler) mux.HandleFunc("/gqlws", ws_handler)
mux.HandleFunc("/", GraphiQLHandler()) mux.HandleFunc("/graphiql", GraphiQLHandler())
fs := http.FileServer(http.Dir("./site"))
mux.Handle("/site/", http.StripPrefix("/site", fs))
srv := &http.Server{ srv := &http.Server{
Addr: server.listen, Addr: server.listen,