Function libracerd::http::serve
[−]
[src]
pub fn serve<E: SemanticEngine + 'static>(config: &Config, engine: E) -> Result<Server>
Start the http server using the given configuration
serve
is non-blocking.
Example
let mut cfg = Config::new(); cfg.port = 3000; let engine = ::libracerd::engine::Racer::new(); let mut server = ::libracerd::http::serve(&cfg, engine).unwrap(); // ... later server.close().unwrap();