meowy-webring/src/main.rs

30 lines
533 B
Rust

use crate::watcher::hot_reloading;
use rocket::tokio;
use sites::init_names;
#[macro_use]
extern crate rocket;
mod assets;
mod links;
mod routes;
mod sites;
mod watcher;
#[launch]
async fn rocket() -> _ {
init_names().unwrap();
tokio::task::spawn_blocking(hot_reloading);
rocket::build()
.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],
)
}