1 unstable release
0.1.0 | Dec 29, 2023 |
---|
#21 in #file-serving
Used in xitca-web
31KB
706 lines
an async static file serving crate
use http::Request;
use http_file::ServeDir;
async fn serve(req: &Request<()>) {
let dir = ServeDir::new("sample");
let res = dir.serve(&req).await;
}
Requirement
[^1]: see project Cargo.toml
for dependency versioning.
lib.rs
:
local file serving with http.
Dependencies
~3–11MB
~106K SLoC