pub rocket_workers: Option<u16>,
pub template_dir: Option<String>,
pub log: Option<toml::Value>,
+ pub bundled_sources: Option<String>,
}
#[derive(Debug,Clone)]
pub rocket_workers: u16,
pub template_dir: String,
pub log: LogSpecification,
+ pub bundled_sources: String,
}
impl TryFrom<ServerConfigSpec> for ServerConfig {
fn try_from(spec: ServerConfigSpec) -> ServerConfig {
let ServerConfigSpec {
save_directory, command_socket, debug,
- http_port, rocket_workers, template_dir, log,
+ http_port, rocket_workers, template_dir, log, bundled_sources,
} = spec;
let save_directory = save_directory
let log = LogSpecification::from_toml(&log)
.context("log specification")?;
+ let bundled_sources = bundled_sources
+ .unwrap_or_else(|| save_directory.clone());
+
ServerConfig {
save_directory, command_socket, debug,
- http_port, rocket_workers, template_dir, log,
+ http_port, rocket_workers, template_dir, log, bundled_sources,
}
}
}