11 releases (3 stable)
| 2.0.1 | Nov 16, 2023 |
|---|---|
| 2.0.0-alpha.2 | Sep 16, 2023 |
| 1.0.0 | Aug 22, 2019 |
| 0.5.0 | Apr 5, 2019 |
| 0.1.0 | Mar 5, 2019 |
#1809 in HTTP server
53 downloads per month
61KB
1K
SLoC
http-fs
Features
tokio- Enablestokioruntime integration. Enablesrt.hyper- Enableshyperintegration. Enableshttp1andserverfeatures.
Usage
use http_fs::config::{self, StaticFileConfig, DummyWorker};
use http_fs::{StaticFiles};
use std::path::Path;
pub struct DirectoryConfig;
impl StaticFileConfig for DirectoryConfig {
type FileService = config::DefaultConfig;
type DirService = config::DefaultConfig;
fn handle_directory(&self, _path: &Path) -> bool {
true
}
}
fn main() {
let static_files = StaticFiles::new(DummyWorker, DirectoryConfig);
}
http-fs
Features
tokio- Enablestokioruntime integration. Enablesrt.hyper- Enableshyperintegration. Enableshttp1andserverfeatures.
Dependencies
~1–2MB
~33K SLoC