2017-12-06 15:29:10 +01:00
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(rocket_codegen)]
|
|
|
|
|
2017-12-17 13:19:27 +01:00
|
|
|
extern crate comrak;
|
|
|
|
extern crate glob;
|
|
|
|
extern crate inflector;
|
2017-12-06 15:29:10 +01:00
|
|
|
extern crate rocket;
|
2017-12-06 16:47:55 +01:00
|
|
|
extern crate rocket_contrib;
|
2017-12-06 15:29:10 +01:00
|
|
|
|
2017-12-06 15:38:07 +01:00
|
|
|
use rocket::Rocket;
|
2017-12-06 16:47:55 +01:00
|
|
|
use rocket_contrib::Template;
|
2017-12-06 15:38:07 +01:00
|
|
|
|
2017-12-17 13:19:27 +01:00
|
|
|
mod list;
|
2017-12-06 15:34:56 +01:00
|
|
|
mod static_files;
|
|
|
|
|
2017-12-06 15:29:10 +01:00
|
|
|
#[get("/")]
|
|
|
|
fn index() -> &'static str {
|
|
|
|
"Hello, world!"
|
|
|
|
}
|
|
|
|
|
2017-12-06 15:38:07 +01:00
|
|
|
fn rocket() -> Rocket {
|
2017-12-17 13:19:27 +01:00
|
|
|
let lists = list::List::load_all();
|
2017-12-06 15:29:10 +01:00
|
|
|
rocket::ignite()
|
2017-12-06 15:34:56 +01:00
|
|
|
.mount("/", routes![index, static_files::all])
|
2017-12-06 16:47:55 +01:00
|
|
|
.attach(Template::fairing())
|
2017-12-06 15:38:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
rocket().launch();
|
2017-12-06 15:29:10 +01:00
|
|
|
}
|