pub fn serve(dir: &Path, preferred_port: u16) -> Result<(), String>
Serve dir until stopped.
dir
Binds to loopback, trying the preferred port first and its successors after, and prints the URL to open once listening.