mirror of
https://github.com/tokio-rs/axum.git
synced 2025-03-13 19:27:53 +01:00
Misc clean up
This commit is contained in:
parent
ba9c03d146
commit
9a419de290
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
use axum::{prelude::*, service::ServiceExt};
|
||||
use axum::{prelude::*, routing::nest, service::ServiceExt};
|
||||
use http::StatusCode;
|
||||
use std::net::SocketAddr;
|
||||
use tower_http::{services::ServeDir, trace::TraceLayer};
|
||||
|
@ -7,7 +7,7 @@ use tower_http::{services::ServeDir, trace::TraceLayer};
|
|||
async fn main() {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let app = axum::routing::nest(
|
||||
let app = nest(
|
||||
"/static",
|
||||
axum::service::get(ServeDir::new(".").handle_error(|error: std::io::Error| {
|
||||
Ok::<_, std::convert::Infallible>((
|
||||
|
|
Loading…
Add table
Reference in a new issue