diff --git a/src/404.html b/src/404.html index c283fe1..46b0428 100644 --- a/src/404.html +++ b/src/404.html @@ -2,6 +2,7 @@ + Ouch! diff --git a/src/favicon.ico b/src/favicon.ico new file mode 100644 index 0000000..38e4e57 Binary files /dev/null and b/src/favicon.ico differ diff --git a/src/index.html b/src/index.html index fe442d6..bafeb3e 100644 --- a/src/index.html +++ b/src/index.html @@ -2,6 +2,7 @@ + Hello! diff --git a/src/main.rs b/src/main.rs index a5b42d9..c8202fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,8 @@ use std::fs::File; fn main() { rouille::start_server("127.0.0.1:8080", move |Request| { router!(Request, - (GET) (/) => { Response::from_file("text/html", File::open("src/index.html").unwrap()).with_status_code(200) }, + (GET) ["/"] => { Response::from_file("text/html", File::open("src/index.html").unwrap()).with_status_code(200) }, + (GET) ["/favicon.ico"] => { Response::from_file("image/vnd.microsoft.icon", File::open("src/favicon.ico").unwrap()).with_status_code(200) }, _ => { Response::from_file("text/html", File::open("src/404.html").unwrap()).with_status_code(404) } ) });