http-file 0.3.0

file serving for http crate type
Documentation

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

  • http
  • futures for http types and async streaming interaction