start_server

Function start_server 

Source
pub async fn start_server(
    state: Arc<ServerState>,
    listen_addr: &str,
    port: u16,
    cert_path: Option<&str>,
    key_path: Option<&str>,
) -> Result<(), Error>
Expand description

Start the HTTP or HTTPS server.

When cert_path and key_path are both Some, the server listens with TLS (https://). When either is None, it listens as plain HTTP.