meowy-webring/src/main.rs

27 lines
516 B
Rust
Raw Normal View History

#[macro_use]
extern crate rocket;
mod assets;
mod links;
mod routes;
mod names;
use names::Site;
2023-06-28 20:32:25 +00:00
#[launch]
fn rocket() -> _ {
2023-06-30 16:47:25 +00:00
let names_file = std::fs::File::open("names.json").unwrap();
let names = names::load_names(names_file).unwrap();
rocket::build()
.manage(names)
.mount(
"/",
routes![routes::index, routes::previous, routes::next, routes::name],
)
.register("/", catchers![routes::not_found])
.mount(
"/public",
routes![assets::style, assets::woff2_font, assets::woff_font],
)
2023-06-28 20:32:25 +00:00
}