~repos /rust-embed
git clone https://pyrossh.dev/repos/rust-embed.git
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
686d5664
—
Mark Drobnak 5 years ago
Merge branch 'master' into fix/relative-path-resolution
- examples/warp.rs +1 -1
examples/warp.rs
CHANGED
|
@@ -8,7 +8,7 @@ struct Asset;
|
|
|
8
8
|
#[tokio::main]
|
|
9
9
|
async fn main() {
|
|
10
10
|
let index_html = warp::path::end().and_then(serve_index);
|
|
11
|
-
let dist = warp::path
|
|
11
|
+
let dist = warp::path("dist").and(warp::path::tail()).and_then(serve);
|
|
12
12
|
|
|
13
13
|
let routes = index_html.or(dist);
|
|
14
14
|
warp::serve(routes).run(([127, 0, 0, 1], 8080)).await;
|