1 2 3 4 5 6 7 8 9 10 11 12 13 14
//! This module implements the http server support for our application. use std::net::ToSocketAddrs; use hyper::server::Server; use app::Pencil; /// Run the `Pencil` application. pub fn run_server<A: ToSocketAddrs>(application: Pencil, addr: A) { let server = Server::http(addr).unwrap(); let _guard = server.handle(application).unwrap(); }