Skip to main content

serve

Function serve 

Source
pub fn serve(
    root: &Path,
    port: u16,
    ready: impl FnOnce(Started) + Send,
) -> Result<(), String>
Expand description

Serves the project at root on port (0: any free one) until the process ends; ready is told the address once it listens. Outside a project the host serves the welcome until it is bound to one.