fn start_server(port: u16) {
        let config = config::Config {
            port,
            root_path: "./test-fixtures/".into(),
            cert_path: "./cert.pem".into(),
            key_path: "./key.pem".into(),
            csp: "default-src * data: blob:; script-src 'self' http://127.0.0.1 https://shared.local; object-src 'none'; style-src 'self' 'unsafe-inline' https://lighttheme.local https://darktheme.local https://shared.local".into(),
        };

        thread::Builder::new()
            .name(format!("vhost server on port {}", port))
            .spawn(move || {
                crate::start_server(&config);
            })
            .expect("Failed to start vhost server");

        thread::sleep(std::time::Duration::from_secs(3));
    }
// Launches a https server on the given port, and waits a bit to let it be ready.
Launches a https server on the given port, and waits a bit to let it be ready.
Launches a https server on the given port and waits a bit to let it be ready .
fn start_server(port: u16) {
        let config = config::Config {
            port,
            root_path: "./test-fixtures/".into(),
            cert_path: "./cert.pem".into(),
            key_path: "./key.pem".into(),
            csp: "default-src * data: blob:; script-src 'self' http://127.0.0.1 https://shared.local; object-src 'none'; style-src 'self' 'unsafe-inline' https://lighttheme.local https://darktheme.local https://shared.local".into(),
        };
        thread::Builder::new()
            .name(format!("vhost server on port {}", port))
            .spawn(move || {
                crate::start_server(&config);
            })
            .expect("Failed to start vhost server");
        thread::sleep(std::time::Duration::from_secs(3));
    }
fn start_server ( port : u16 ) { let config = config :: Config { port , root_path : " " . into ( ) , cert_path : " " . into ( ) , key_path : " " . into ( ) , csp : " " . into ( ) , } ; thread :: Builder :: new ( ) . name ( format ! ( " " port ) ) . spawn ( move | | { crate :: start_server ( & config ) ; } ) . expect ( " " ) ; thread :: sleep ( std :: time :: Duration :: from_secs ( 3 ) ) ; }
Launches a https server on the given port, and waits a bit to let it be ready.
Launches a https server on the given port and waits a bit to let it be ready .
port
u16
port
u16