Fix static file location
This commit is contained in:
parent
b48090656b
commit
ab0579b45b
14
src/main.rs
14
src/main.rs
|
|
@ -57,12 +57,14 @@ async fn main() {
|
||||||
// `GET /` goes to `root`
|
// `GET /` goes to `root`
|
||||||
.nest(
|
.nest(
|
||||||
"/assets",
|
"/assets",
|
||||||
get_service(ServeDir::new(".")).handle_error(|error: std::io::Error| async move {
|
get_service(ServeDir::new("templates/assets")).handle_error(
|
||||||
(
|
|error: std::io::Error| async move {
|
||||||
StatusCode::INTERNAL_SERVER_ERROR,
|
(
|
||||||
format!("Unhandled internal error: {}", error),
|
StatusCode::INTERNAL_SERVER_ERROR,
|
||||||
)
|
format!("Unhandled internal error: {}", error),
|
||||||
}),
|
)
|
||||||
|
},
|
||||||
|
),
|
||||||
)
|
)
|
||||||
.route("/", get(index))
|
.route("/", get(index))
|
||||||
.layer(Extension(store))
|
.layer(Extension(store))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue