Skip to content

Commit

Permalink
Serve Web UI for / endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
imclint21 committed Nov 28, 2019
1 parent 3a05d62 commit feb452c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ impl Server {
.and_then(patch_key)),
);

let webui = fs::dir("assets")
let webui = warp::get2()
.and(path::end())
.and(fs::file("webui/dist/index.html"))
.or(fs::dir("webui/dist"))
.and(webui_enabled);

Expand Down

0 comments on commit feb452c

Please sign in to comment.