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`
|
||||
.nest(
|
||||
"/assets",
|
||||
get_service(ServeDir::new(".")).handle_error(|error: std::io::Error| async move {
|
||||
(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
format!("Unhandled internal error: {}", error),
|
||||
)
|
||||
}),
|
||||
get_service(ServeDir::new("templates/assets")).handle_error(
|
||||
|error: std::io::Error| async move {
|
||||
(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
format!("Unhandled internal error: {}", error),
|
||||
)
|
||||
},
|
||||
),
|
||||
)
|
||||
.route("/", get(index))
|
||||
.layer(Extension(store))
|
||||
|
|
|
|||
Loading…
Reference in New Issue