[][src]Function bindle::server::server

pub async fn server<S, I>(
    store: S,
    index: I,
    addr: impl Into<SocketAddr> + 'static,
    tls: Option<TlsConfig>
) -> Result<()> where
    S: Storage + Clone + Send + Sync + 'static,
    I: Search + Clone + Send + Sync + 'static, 

Returns a future that runs a server until it receives a SIGINT to stop. If optional TLS configuration is given, the server will be configured to use TLS. Otherwise it will use plain HTTP