Struct httimple::app::App
[−]
[src]
pub struct App { /* fields omitted */ }
This is how you use it:
´´´ let mut app = App::new(); app.serve("/", | call: &Call | -> Message { Message::from(file("index.html")) }); app.start(); ´´´
Methods
impl App
[src]
pub fn new() -> App
[src]
pub fn serve(&mut self, path: &'static str, callback: fn(_: &Call) -> Message)
[src]
Routes calls comming from that path to that function.
pub fn start(&mut self)
[src]
Boot up the server