serve_features_with_config_and_watching

Function serve_features_with_config_and_watching 

Source
pub async fn serve_features_with_config_and_watching(
    features: &[Feature],
    config: ServerConfig,
    watch_path: Option<PathBuf>,
    on_ready: Option<Box<dyn FnOnce() + Send>>,
) -> Result<()>
Expand description

Starts an HTTP server with custom configuration and optional file watching.

§Arguments

  • features - Slice of Feature objects to serve as JSON
  • config - Server configuration
  • watch_path - Optional path to watch for file changes
  • on_ready - Optional callback to be called when server is ready

§Returns

  • Result<()> - Ok if server starts successfully, Err otherwise