meowy-webring/src/main.rs

24 lines
499 B
Rust

#[macro_use]
extern crate rocket;
mod assets;
mod links;
mod routes;
#[launch]
fn rocket() -> _ {
let names_file = std::fs::read_to_string("names.json").unwrap();
let names = shared::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],
)
}