2017-09-19 03:32:15 -07:00
|
|
|
use rocket;
|
|
|
|
|
|
|
|
use rocket::response::NamedFile;
|
|
|
|
|
2017-09-19 01:54:54 -07:00
|
|
|
#[get("/")]
|
2017-09-19 03:32:15 -07:00
|
|
|
fn index() -> Result<NamedFile, ()> {
|
|
|
|
NamedFile::open("static/index.html").map_err(|_| ())
|
2017-09-19 01:54:54 -07:00
|
|
|
}
|
|
|
|
|
2017-09-19 03:32:15 -07:00
|
|
|
pub fn web_main() {
|
2017-09-19 01:54:54 -07:00
|
|
|
rocket::ignite().mount("/", routes![index]).launch();
|
|
|
|
}
|