extern crate rouille; extern crate rand; use std::thread; mod http; mod random_names; mod state; mod smtp; fn main() { println!("Starting on localhost:8005"); let state = state::fresh_state(); let http_thread = thread::spawn(|| { rouille::start_server("localhost:8005", move |request| { http::http_handler(request, &state) }) }); let smtp_thread = thread::spawn(|| { smtp::start_server(); }); http_thread.join().unwrap(); smtp_thread.join().unwrap(); }