use http_server_tiny::{route, HttpServer, Method, Res};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut server = HttpServer::new("0.0.0.0:8000", "./static/error.html");
route!(get_html => server, "/", "./static/index.html");
route!(get_js => server, "/index.js", "./static/index.js");
server.handle_requests(Box::new(|req| {
println!("INFO: {} {}", req.method, req.url);
}))
}