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 |
#480 in HTTP server
53 downloads per month
61KB
1K
SLoC
http-fs
Features
tokio
- Enablestokio
runtime integration. Enablesrt
.hyper
- Enableshyper
integration. Enableshttp1
andserver
features.
lib.rs
:
http-fs
Features
tokio
- Enablestokio
runtime integration. Enablesrt
.hyper
- Enableshyper
integration. Enableshttp1
andserver
features.
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);
}
Dependencies
~1–7MB
~45K SLoC