struct
Config
pub struct Config {
pub port: u16,
pub root: PathBuf,
pub spa: bool,
}How to serve: the port, the directory, and whether unknown paths get index.html.
Fields
Methods
from_args
pub fn from_args(args: &[String], env: impl Fn(&str) -> Option<String>) -> Result<Config, String>Defaults ← PORT / WEFT_ROOT env ← --port / --root / --no-spa.