pub async fn serve_features_with_watching(
features: &[Feature],
port: u16,
watch_path: PathBuf,
on_ready: Option<Box<dyn FnOnce() + Send>>,
skip_changes: bool,
ignore_paths: Vec<PathBuf>,
include_skipped_dirs: bool,
) -> Result<()>Expand description
Starts an HTTP server with file watching for a specific directory.
§Arguments
features- Initial Feature objects to serve as JSONport- Port number to run the server onwatch_path- Path to watch for file changeson_ready- Optional callback to be called when server is readyskip_changes- Whether changes were skipped during feature computationignore_paths- Folders to ignore when features are recomputedinclude_skipped_dirs- Whether to scan folders skipped by default when features are recomputed
§Returns
Result<()>- Ok if server starts successfully, Err otherwise